0.8 update
This commit is contained in:
commit
65747e84b8
125
Common Files/Game.cpp
Normal file
125
Common Files/Game.cpp
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
#include <Windows.h>
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
#include "Game.h"
|
||||||
|
|
||||||
|
typedef unsigned char U8;
|
||||||
|
|
||||||
|
bool Helpers::fileExists(char *filename)
|
||||||
|
{
|
||||||
|
std::ifstream ifile(filename);
|
||||||
|
return !ifile.fail();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Helpers::log(char *msg) {
|
||||||
|
if (enableLogging == 0) { return; }
|
||||||
|
std::ofstream ofs("FFBlog.txt", std::ofstream::app);
|
||||||
|
ofs << msg << std::endl;
|
||||||
|
ofs.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Helpers::logInt(int value) {
|
||||||
|
std::string njs = std::to_string(value);
|
||||||
|
log((char *)njs.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
void Helpers::logInit(char *msg) {
|
||||||
|
if (enableLogging == 0) { return; }
|
||||||
|
std::ofstream ofs("FFBlog.txt", std::ofstream::out);
|
||||||
|
ofs << msg << std::endl;
|
||||||
|
ofs.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
// reading memory
|
||||||
|
LPVOID Helpers::GetTranslatedOffset(INT_PTR offset)
|
||||||
|
{
|
||||||
|
return reinterpret_cast<LPVOID>((INT_PTR)GetModuleHandle(NULL) + offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
UINT8 Helpers::ReadByte(INT_PTR offset, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
UINT8 val = 0;
|
||||||
|
SIZE_T read;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
ReadProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(UINT8), &read);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Helpers::WriteFloat32(INT_PTR offset, float val, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
//val = 0.0f;
|
||||||
|
SIZE_T written;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
WriteProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(float), &written);
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT8 Helpers::WriteByte(INT_PTR offset, UINT8 val, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
SIZE_T written;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
WriteProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(UINT8), &written);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
INT_PTR Helpers::WriteIntPtr(INT_PTR offset, INT_PTR val, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
SIZE_T written;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
WriteProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(INT_PTR), &written);
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
UINT8 Helpers::WriteNop(INT_PTR offset, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
U8 nop = 0x90;
|
||||||
|
SIZE_T written;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
WriteProcessMemory(GetCurrentProcess(), trueOffset, &nop, 1, &written);
|
||||||
|
return nop;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Helpers::ReadInt32(INT_PTR offset, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
int val = 0;
|
||||||
|
SIZE_T read;
|
||||||
|
//log("going to try to RPM");
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
ReadProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(int), &read);
|
||||||
|
//log("RPM");
|
||||||
|
//char text[256];
|
||||||
|
//sprintf_s(text, "%16X / %16X\n", offset, trueOffset);
|
||||||
|
//log(text);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
INT_PTR Helpers::ReadIntPtr(INT_PTR offset, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
SIZE_T read;
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
INT_PTR val;
|
||||||
|
ReadProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(INT_PTR), &read);
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
float Helpers::ReadFloat32(INT_PTR offset, bool isRelativeOffset)
|
||||||
|
{
|
||||||
|
|
||||||
|
float val = 0.0f;
|
||||||
|
SIZE_T read;
|
||||||
|
//log("going to try to RPM");
|
||||||
|
LPVOID trueOffset = (isRelativeOffset ? GetTranslatedOffset(offset) : (LPVOID)offset);
|
||||||
|
ReadProcessMemory(GetCurrentProcess(), trueOffset, &val, sizeof(float), &read);
|
||||||
|
//char text[256];
|
||||||
|
//sprintf_s(text, "%16X / %16X\n", offset, trueOffset);
|
||||||
|
//log(text);
|
||||||
|
//log("RPM");
|
||||||
|
return val;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
void Game::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
98
Common Files/Game.h
Normal file
98
Common Files/Game.h
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <Windows.h>
|
||||||
|
// struct
|
||||||
|
struct EffectTriggers {
|
||||||
|
void(*Constant)(int direction, double strength);
|
||||||
|
void(*Spring)(double strength);
|
||||||
|
void(*Friction)(double strength);
|
||||||
|
void(*Sine)(UINT16 period, UINT16 fadePeriod, double strength);
|
||||||
|
void(*Rumble)(double strength, double length);
|
||||||
|
void(*LeftRight)(double smallstrength, double largestrength, double length);
|
||||||
|
void(*LeftRightDevice2)(double smallstrength, double largestrength, double length);
|
||||||
|
void(*Springi)(double strength);
|
||||||
|
};
|
||||||
|
|
||||||
|
// classes
|
||||||
|
class EffectCollection {
|
||||||
|
public:
|
||||||
|
int effect_id = 0;
|
||||||
|
int effect_left_id = 0;
|
||||||
|
int effect_right_id = 0;
|
||||||
|
int effect_friction_id = 0;
|
||||||
|
int effect_leftright_id = 0;
|
||||||
|
int effect_sine_id = 0;
|
||||||
|
int effect_spring_id = 0;
|
||||||
|
int effect_vibration_id = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class EffectConstants {
|
||||||
|
public:
|
||||||
|
// constants
|
||||||
|
// Haptic forces are defined by the direction that generates the force
|
||||||
|
// e.g. DIRECTION_FROM_LEFT causes wheel to go right.
|
||||||
|
const int DIRECTION_FROM_LEFT = -1;
|
||||||
|
const int DIRECTION_FROM_RIGHT = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
#define VK_A 0x41
|
||||||
|
#define VK_B 0x42
|
||||||
|
#define VK_C 0x43
|
||||||
|
#define VK_D 0x44
|
||||||
|
#define VK_E 0x45
|
||||||
|
#define VK_F 0x46
|
||||||
|
#define VK_G 0x47
|
||||||
|
#define VK_H 0x48
|
||||||
|
#define VK_I 0x49
|
||||||
|
#define VK_J 0x4A
|
||||||
|
#define VK_K 0x4B
|
||||||
|
#define VK_L 0x4C
|
||||||
|
#define VK_M 0x4D
|
||||||
|
#define VK_N 0x4E
|
||||||
|
#define VK_O 0x4F
|
||||||
|
#define VK_P 0x50
|
||||||
|
#define VK_Q 0x51
|
||||||
|
#define VK_R 0x52
|
||||||
|
#define VK_S 0x53
|
||||||
|
#define VK_T 0x54
|
||||||
|
#define VK_U 0x55
|
||||||
|
#define VK_V 0x56
|
||||||
|
#define VK_W 0x57
|
||||||
|
#define VK_X 0x58
|
||||||
|
#define VK_Y 0x59
|
||||||
|
#define VK_Z 0x5A
|
||||||
|
|
||||||
|
#define SDL_HAT_CENTERED 0x00
|
||||||
|
#define SDL_HAT_UP 0x01
|
||||||
|
#define SDL_HAT_RIGHT 0x02
|
||||||
|
#define SDL_HAT_DOWN 0x04
|
||||||
|
#define SDL_HAT_LEFT 0x08
|
||||||
|
#define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP)
|
||||||
|
#define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN)
|
||||||
|
#define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP)
|
||||||
|
#define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN)
|
||||||
|
|
||||||
|
class Helpers {
|
||||||
|
public:
|
||||||
|
int enableLogging = 0;
|
||||||
|
// helper functions
|
||||||
|
bool fileExists(char *filename);
|
||||||
|
// logging
|
||||||
|
void log(char *msg);
|
||||||
|
void logInt(int value);
|
||||||
|
void logInit(char *msg);
|
||||||
|
// reading memory
|
||||||
|
LPVOID GetTranslatedOffset(INT_PTR offset);
|
||||||
|
int ReadInt32(INT_PTR offset, bool isRelativeOffset);
|
||||||
|
UINT8 ReadByte(INT_PTR offset, bool isRelativeOffset);
|
||||||
|
float WriteFloat32(INT_PTR offset, float val, bool isRelativeOffset);
|
||||||
|
UINT8 WriteByte(INT_PTR offset, UINT8 val, bool isRelativeOffset);
|
||||||
|
INT_PTR WriteIntPtr(INT_PTR offset, INT_PTR val, bool isRelativeOffset);
|
||||||
|
UINT8 WriteNop(INT_PTR offset, bool isRelativeOffset);
|
||||||
|
INT_PTR ReadIntPtr(INT_PTR offset, bool isRelativeOffset);
|
||||||
|
float ReadFloat32(INT_PTR offset, bool isRelativeOffset);
|
||||||
|
};
|
||||||
|
|
||||||
|
class Game {
|
||||||
|
public:
|
||||||
|
virtual void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
17
Common Files/TeknoParrotGame.cpp
Normal file
17
Common Files/TeknoParrotGame.cpp
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include "TeknoParrotGame.h"
|
||||||
|
TeknoParrotGame::TeknoParrotGame()
|
||||||
|
{
|
||||||
|
hSection = CreateFileMapping(INVALID_HANDLE_VALUE, nullptr, PAGE_READWRITE, 0, 64, L"TeknoParrot_JvsState");
|
||||||
|
secData = MapViewOfFile(hSection, FILE_MAP_ALL_ACCESS, 0, 0, 64);
|
||||||
|
ffbOffset = *((int *)secData + 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
int TeknoParrotGame::GetTeknoParrotFFB()
|
||||||
|
{
|
||||||
|
ffbOffset = *((int *)secData + 2);
|
||||||
|
return ffbOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
void TeknoParrotGame::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
helpers->log("TeknoParrot game not implemented");
|
||||||
|
}
|
18
Common Files/TeknoParrotGame.h
Normal file
18
Common Files/TeknoParrotGame.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Game.h"
|
||||||
|
|
||||||
|
class TeknoParrotGame : public Game {
|
||||||
|
|
||||||
|
// TP-related
|
||||||
|
HANDLE hSection;
|
||||||
|
LPVOID secData;
|
||||||
|
int ffbOffset = 0;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int lastWasStop = 0;
|
||||||
|
int GetTeknoParrotFFB();
|
||||||
|
TeknoParrotGame();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
442
Config/FFBPlugin.ini
Normal file
442
Config/FFBPlugin.ini
Normal file
@ -0,0 +1,442 @@
|
|||||||
|
; ***********************************************************************************************************************************
|
||||||
|
; **************************************************** FFBPlugin.ini source file ****************************************************
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
|
||||||
|
; This file contains a master list of settings -- both default values and overrides for specific games.
|
||||||
|
; This file should not necessarily be distributed upon release. Rather, a post-build step creates individual files for various games
|
||||||
|
; that take into account the default settings and each games overrides.
|
||||||
|
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
; ************************************************* Default values set for all games ************************************************
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
; GameId specifies the game behavior to use - e.g. which address to read, how to interpret values, etc.
|
||||||
|
GameId=-1
|
||||||
|
; All forces /designated within a game/ will be scaled to exist between MinForce and MaxForce
|
||||||
|
; 0-100: you may want to set a min force if your wheel doesn't deliver sufficient forces when values are low
|
||||||
|
MinForce=0
|
||||||
|
; 0-100: you may want to set a max force below 100 if your wheel's forces are stronger than desired @ 100%
|
||||||
|
MaxForce=100
|
||||||
|
; Set Device GUID to connect to specific joystick or controller.
|
||||||
|
DeviceGUID=
|
||||||
|
;Set to 1 if you want to enable rumble, else 0.
|
||||||
|
EnableRumble=1
|
||||||
|
; Set to 1 to generate log.txt, else 0. Logs will be appended and not cleared.
|
||||||
|
ReverseRumble=0
|
||||||
|
Logging=1
|
||||||
|
; When a command is set that contradicts a prior command, clear the prior command. Probably should stay as 1.
|
||||||
|
ResetFeedback=1
|
||||||
|
; Length of a feedback command. While a long period works fine (as long as ResetFeedback=1), some games may still require shorter ones.
|
||||||
|
FeedbackLength=5000
|
||||||
|
; If a game does not specify its own Centering or Friction forces (e.g. only specifies roll left/right),
|
||||||
|
; then a default centering and friction force can be applied here. If a game has any of its own such forces,
|
||||||
|
; these values will be overwritten immediately in-game.
|
||||||
|
; 0-100; Centering is the force that brings the wheel back to the center. Use -1 to disable behavior.
|
||||||
|
DefaultCentering=0
|
||||||
|
; 0-100; Friction determines how difficult a wheel is to turn. Use -1 to disable behavior.
|
||||||
|
DefaultFriction=0
|
||||||
|
; Beep when plugin hooks the exe
|
||||||
|
BeepWhenHook=0
|
||||||
|
; Alternative FFB is for PWM2M2 board and wheel etc
|
||||||
|
AlternativeFFB=0
|
||||||
|
AlternativeMinForceLeft=0
|
||||||
|
AlternativeMaxForceLeft=-100
|
||||||
|
AlternativeMinForceRight=0
|
||||||
|
AlternativeMaxForceRight=100
|
||||||
|
ForceShowDeviceGUIDMessageBox=0
|
||||||
|
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
; ************************************************ Game overrides are specified below ***********************************************
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
|
||||||
|
[Daytona Championship USA]
|
||||||
|
GameId=1
|
||||||
|
MinForce=10
|
||||||
|
MaxForce=75
|
||||||
|
FeedbackLength=30000
|
||||||
|
ShowButtonNumbersForSetup=0
|
||||||
|
ChangeGearsViaPlugin=0
|
||||||
|
EscapeKeyExitViaPlugin=0
|
||||||
|
MenuMovementViaPlugin=0
|
||||||
|
Gear1=8
|
||||||
|
Gear2=10
|
||||||
|
Gear3=9
|
||||||
|
Gear4=11
|
||||||
|
GearUp=4
|
||||||
|
GearDown=5
|
||||||
|
HideCursor=0
|
||||||
|
;Gear buttons pre-set for Logitech G25 Shifter
|
||||||
|
|
||||||
|
[Demul]
|
||||||
|
GameId=26
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Wacky Races]
|
||||||
|
GameId=2
|
||||||
|
MinForce=5
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=15
|
||||||
|
|
||||||
|
[Chase HQ 2]
|
||||||
|
GameId=3
|
||||||
|
MinForce=5
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=15
|
||||||
|
|
||||||
|
[AfterburnerClimax]
|
||||||
|
GameId=15
|
||||||
|
Rumble1Strength=50
|
||||||
|
Rumble2Strength=100
|
||||||
|
Rumble1Length=200
|
||||||
|
Rumble2Length=200
|
||||||
|
|
||||||
|
[LGI]
|
||||||
|
GameId=31
|
||||||
|
Device2GUID=
|
||||||
|
Knock1pStrength=50
|
||||||
|
Motor1pStrength=60
|
||||||
|
Health1pStrength=100
|
||||||
|
Knock2pStrength=50
|
||||||
|
Motor2pStrength=60
|
||||||
|
Health2pStrength=100
|
||||||
|
HowtoRumbleKnockEffect=0
|
||||||
|
HowtoRumbleMotorEffect=0
|
||||||
|
HowtoRumbleHealthEffect=0
|
||||||
|
|
||||||
|
[LGI3D]
|
||||||
|
GameId=30
|
||||||
|
Device2GUID=
|
||||||
|
Knock1pStrength=50
|
||||||
|
Motor1pStrength=60
|
||||||
|
Health1pStrength=100
|
||||||
|
Knock2pStrength=50
|
||||||
|
Motor2pStrength=60
|
||||||
|
Health2pStrength=100
|
||||||
|
HowtoRumbleKnockEffect=0
|
||||||
|
HowtoRumbleMotorEffect=0
|
||||||
|
HowtoRumbleHealthEffect=0
|
||||||
|
|
||||||
|
[Sega Racing Classic]
|
||||||
|
GameId=5
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Sega Rally 3]
|
||||||
|
GameId=6
|
||||||
|
FeedbackLength=30000
|
||||||
|
DefaultCentering=15
|
||||||
|
|
||||||
|
[InitialD4]
|
||||||
|
GameId=16
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[InitialD4Japan]
|
||||||
|
GameId=24
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[InitialD5]
|
||||||
|
GameId=23
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[InitialD6]
|
||||||
|
GameId=8
|
||||||
|
DefaultCentering=30
|
||||||
|
FeedbackLength=500
|
||||||
|
SineDivision=150
|
||||||
|
|
||||||
|
[InitialD7]
|
||||||
|
GameId=17
|
||||||
|
DefaultCentering=30
|
||||||
|
FeedbackLength=500
|
||||||
|
SineDivision=150
|
||||||
|
|
||||||
|
[InitialD8]
|
||||||
|
GameId=18
|
||||||
|
DefaultCentering=30
|
||||||
|
FeedbackLength=500
|
||||||
|
SineDivision=150
|
||||||
|
|
||||||
|
[Ford Racing]
|
||||||
|
GameId=7
|
||||||
|
MaxForce=85
|
||||||
|
DefaultCentering=20
|
||||||
|
|
||||||
|
[Machstorm]
|
||||||
|
GameId=14
|
||||||
|
Power1RumbleStrength=10
|
||||||
|
Power2RumbleStrength=20
|
||||||
|
Power3RumbleStrength=30
|
||||||
|
Power4RumbleStrength=40
|
||||||
|
Power5RumbleStrength=50
|
||||||
|
Power6RumbleStrength=60
|
||||||
|
Power7RumbleStrength=70
|
||||||
|
Power8RumbleStrength=80
|
||||||
|
Power9RumbleStrength=90
|
||||||
|
Power10RumbleStrength=100
|
||||||
|
Power1RumbleLength=50
|
||||||
|
Power2RumbleLength=50
|
||||||
|
Power3RumbleLength=50
|
||||||
|
Power4RumbleLength=50
|
||||||
|
Power5RumbleLength=50
|
||||||
|
Power6RumbleLength=50
|
||||||
|
Power7RumbleLength=50
|
||||||
|
Power8RumbleLength=50
|
||||||
|
Power9RumbleLength=50
|
||||||
|
Power10RumbleLength=100
|
||||||
|
|
||||||
|
[PokkenTournament]
|
||||||
|
GameId=19
|
||||||
|
RumbleStrength=100
|
||||||
|
RumbleLength=500
|
||||||
|
HowtoRumble=0
|
||||||
|
|
||||||
|
[Mario Kart Arcade GP DX v100]
|
||||||
|
GameId=11
|
||||||
|
DefaultCentering=25
|
||||||
|
FeedbackLength=500
|
||||||
|
|
||||||
|
[Battle Gear 4]
|
||||||
|
GameId=13
|
||||||
|
DefaultCentering=25
|
||||||
|
FeedbackLength=500
|
||||||
|
|
||||||
|
[Outrun 2 Special Tours Deluxe Custom]
|
||||||
|
GameId=12
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=100
|
||||||
|
FeedbackLength=500
|
||||||
|
DefaultCentering=-1
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Outrun 2 Special Tours Deluxe Real]
|
||||||
|
GameId=35
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=100
|
||||||
|
FeedbackLength=500
|
||||||
|
|
||||||
|
[WMMT5]
|
||||||
|
GameId=9
|
||||||
|
DefaultCentering=0
|
||||||
|
FeedbackLength=80
|
||||||
|
Logging=0
|
||||||
|
|
||||||
|
[Mame 0199 32bit]
|
||||||
|
GameId=4
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=0
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Mame 0199 64bit]
|
||||||
|
GameId=34
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=0
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Mame 0206 32bit]
|
||||||
|
GameId=32
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=0
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Mame 0206 64bit]
|
||||||
|
GameId=33
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=75
|
||||||
|
DefaultCentering=0
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Sonic & Sega All Stars Racing]
|
||||||
|
GameId=21
|
||||||
|
FeedbackLength=500
|
||||||
|
|
||||||
|
[GTI Club Supermini Festa]
|
||||||
|
GameId=27
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
|
||||||
|
[Road Fighters 3D]
|
||||||
|
GameId=29
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
InputDeviceWheelEnable=0
|
||||||
|
InputDeviceWheelSteeringAxis=0
|
||||||
|
InputDeviceWheelAcclAxis=1
|
||||||
|
InputDeviceWheelBrakeAxis=2
|
||||||
|
InputDeviceWheelReverseAxis=0
|
||||||
|
InputDeviceCombinedPedals=0
|
||||||
|
SteeringDeadzone=2
|
||||||
|
PedalDeadzone=2
|
||||||
|
SequentialGears=0
|
||||||
|
ShowButtonNumbersForSetup=0
|
||||||
|
ShowAxisForSetup=0
|
||||||
|
DpadUp=
|
||||||
|
DpadDown=
|
||||||
|
DpadLeft=
|
||||||
|
DpadRight=
|
||||||
|
ExitButton=2
|
||||||
|
TestButton=7
|
||||||
|
ServiceButton=6
|
||||||
|
CreditButton=0
|
||||||
|
ViewButton=3
|
||||||
|
ThreeDimensionalButton=1
|
||||||
|
leverUp=4
|
||||||
|
leverDown=5
|
||||||
|
leverLeft=8
|
||||||
|
leverRight=9
|
||||||
|
Device2GUID=
|
||||||
|
DpadUpDevice2=
|
||||||
|
DpadDownDevice2=
|
||||||
|
DpadLeftDevice2=
|
||||||
|
DpadRightDevice2=
|
||||||
|
ExitButtonDevice2=2
|
||||||
|
TestButtonDevice2=7
|
||||||
|
ServiceButtonDevice2=6
|
||||||
|
CreditButtonDevice2=0
|
||||||
|
ViewButtonDevice2=3
|
||||||
|
ThreeDimensionalButtonDevice2=1
|
||||||
|
leverUpDevice2=4
|
||||||
|
leverDownDevice2=5
|
||||||
|
leverLeftDevice2=8
|
||||||
|
leverRightDevice2=9
|
||||||
|
|
||||||
|
[Button Rumble 32bit]
|
||||||
|
GameId=28
|
||||||
|
ShowButtonNumbersForSetup=0
|
||||||
|
BothRumbleMotor=1
|
||||||
|
LeftRumbleMotor=0
|
||||||
|
RightRumbleMotor=0
|
||||||
|
RumbleStrength=100
|
||||||
|
RumbleLength=0
|
||||||
|
Device2GUID=
|
||||||
|
Button1Rumble=0
|
||||||
|
Button2Rumble=1
|
||||||
|
Button3Rumble=2
|
||||||
|
Button4Rumble=3
|
||||||
|
Button5Rumble=4
|
||||||
|
Button6Rumble=5
|
||||||
|
Button7Rumble=6
|
||||||
|
Button8Rumble=7
|
||||||
|
Button9Rumble=8
|
||||||
|
Button10Rumble=9
|
||||||
|
Button1Device2Rumble=0
|
||||||
|
Button2Device2Rumble=1
|
||||||
|
Button3Device2Rumble=2
|
||||||
|
Button4Device2Rumble=3
|
||||||
|
Button5Device2Rumble=4
|
||||||
|
Button6Device2Rumble=5
|
||||||
|
Button7Device2Rumble=6
|
||||||
|
Button8Device2Rumble=7
|
||||||
|
Button9Device2Rumble=8
|
||||||
|
Button10Device2Rumble=9
|
||||||
|
|
||||||
|
[Button Rumble 64bit]
|
||||||
|
GameId=36
|
||||||
|
ShowButtonNumbersForSetup=0
|
||||||
|
BothRumbleMotor=1
|
||||||
|
LeftRumbleMotor=0
|
||||||
|
RightRumbleMotor=0
|
||||||
|
RumbleStrength=100
|
||||||
|
RumbleLength=0
|
||||||
|
Device2GUID=
|
||||||
|
Button1Rumble=0
|
||||||
|
Button2Rumble=1
|
||||||
|
Button3Rumble=2
|
||||||
|
Button4Rumble=3
|
||||||
|
Button5Rumble=4
|
||||||
|
Button6Rumble=5
|
||||||
|
Button7Rumble=6
|
||||||
|
Button8Rumble=7
|
||||||
|
Button9Rumble=8
|
||||||
|
Button10Rumble=9
|
||||||
|
Button1Device2Rumble=0
|
||||||
|
Button2Device2Rumble=1
|
||||||
|
Button3Device2Rumble=2
|
||||||
|
Button4Device2Rumble=3
|
||||||
|
Button5Device2Rumble=4
|
||||||
|
Button6Device2Rumble=5
|
||||||
|
Button7Device2Rumble=6
|
||||||
|
Button8Device2Rumble=7
|
||||||
|
Button9Device2Rumble=8
|
||||||
|
Button10Device2Rumble=9
|
||||||
|
|
||||||
|
[Mario Kart Arcade GP DX v110]
|
||||||
|
GameId=20
|
||||||
|
DefaultCentering=-1
|
||||||
|
FeedbackLength=500
|
||||||
|
ConstantEffectForSteering=1
|
||||||
|
ConstantEffectForSteeringStrength=128
|
||||||
|
WeaponRumble=1
|
||||||
|
WeaponRumbleStrength=30
|
||||||
|
CoinRumble=1
|
||||||
|
CoinRumbleStrength=20
|
||||||
|
DriftRumble=1
|
||||||
|
DriftRumbleControllerStrengthMultiplier=100
|
||||||
|
HitGroundRumble=1
|
||||||
|
HitGroundRumbleStrength=15
|
||||||
|
BoostRumble=1
|
||||||
|
BoostRumbleStrength=50
|
||||||
|
MainShakeRumble=1
|
||||||
|
MainShakeRumbleStrength=100
|
||||||
|
DirtRumble=1
|
||||||
|
DirtRumbleStrength=30
|
||||||
|
GrassRumble=1
|
||||||
|
GrassRumbleStrength=20
|
||||||
|
SandRumble=1
|
||||||
|
SandRumbleStrength=10
|
||||||
|
WaterRumble=1
|
||||||
|
WaterRumbleWheelStrength=65
|
||||||
|
WaterRumbleControllerStrengthMultiplier=100
|
||||||
|
TileRumble=1
|
||||||
|
TileRumbleStrength=20
|
||||||
|
CarpetRumble=1
|
||||||
|
CarpetRumbleStrength=20
|
||||||
|
SpeedBumpRumble=1
|
||||||
|
SpeedBumpRumbleStrength=20
|
||||||
|
RoughTrackRumble=1
|
||||||
|
RoughTrackRumbleStrength=10
|
||||||
|
BridgeRumble=1
|
||||||
|
BridgeRumbleStrength=40
|
||||||
|
HideCursor=0
|
||||||
|
|
||||||
|
[M2Emulator]
|
||||||
|
GameId=25
|
||||||
|
MinForce=0
|
||||||
|
MaxForce=100
|
||||||
|
FeedbackLength=500
|
||||||
|
FFBMode=0
|
||||||
|
DaytonaAIMultiplayerHack=0
|
||||||
|
DaytonaForcePanoramicAttract=0
|
||||||
|
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
; ************************************************* Test cases are established below ************************************************
|
||||||
|
; ***********************************************************************************************************************************
|
||||||
|
;
|
||||||
|
;[_Test_Const]
|
||||||
|
;GameId=-1
|
||||||
|
;
|
||||||
|
;[_Test_Sine]
|
||||||
|
;GameId=-2
|
||||||
|
;
|
||||||
|
;[_Test_Friction]
|
||||||
|
;GameId=-3
|
||||||
|
;
|
||||||
|
;[_Test_Spring]
|
||||||
|
;GameId=-4
|
||||||
|
;
|
||||||
|
;[_Test_Heavy]
|
||||||
|
;GameId=-5
|
||||||
|
;
|
||||||
|
;[_Test_Loose]
|
||||||
|
;GameId=-6
|
668
DLLWrapper.asm
Normal file
668
DLLWrapper.asm
Normal file
@ -0,0 +1,668 @@
|
|||||||
|
IFDEF RAX
|
||||||
|
ELSE
|
||||||
|
.MODEL flat, C
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
WrapFunction MACRO functionName
|
||||||
|
|
||||||
|
IFDEF RAX
|
||||||
|
EXTERN @CatStr( original, functionName): QWORD
|
||||||
|
ELSE
|
||||||
|
EXTERN @CatStr( original, functionName): DWORD
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
@CatStr( _, functionName ) PROC
|
||||||
|
jmp [ @CatStr( original, functionName) ]
|
||||||
|
@CatStr( _, functionName ) ENDP
|
||||||
|
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
_DATA SEGMENT
|
||||||
|
_DATA ENDS
|
||||||
|
_TEXT SEGMENT
|
||||||
|
|
||||||
|
WrapFunction CreateDirect3D11DeviceFromDXGIDevice
|
||||||
|
WrapFunction CreateDirect3D11SurfaceFromDXGISurface
|
||||||
|
WrapFunction D3D11CoreCreateDevice
|
||||||
|
WrapFunction D3D11CoreCreateLayeredDevice
|
||||||
|
WrapFunction D3D11CoreGetLayeredDeviceSize
|
||||||
|
WrapFunction D3D11CoreRegisterLayers
|
||||||
|
WrapFunction D3D11CreateDevice
|
||||||
|
WrapFunction D3D11CreateDeviceAndSwapChain
|
||||||
|
WrapFunction D3D11CreateDeviceForD3D12
|
||||||
|
WrapFunction D3D11On12CreateDevice
|
||||||
|
WrapFunction D3DKMTCloseAdapter
|
||||||
|
WrapFunction D3DKMTCreateAllocation
|
||||||
|
WrapFunction D3DKMTCreateContext
|
||||||
|
WrapFunction D3DKMTCreateDevice
|
||||||
|
WrapFunction D3DKMTCreateSynchronizationObject
|
||||||
|
WrapFunction D3DKMTDestroyAllocation
|
||||||
|
WrapFunction D3DKMTDestroyContext
|
||||||
|
WrapFunction D3DKMTDestroyDevice
|
||||||
|
WrapFunction D3DKMTDestroySynchronizationObject
|
||||||
|
WrapFunction D3DKMTEscape
|
||||||
|
WrapFunction D3DKMTGetContextSchedulingPriority
|
||||||
|
WrapFunction D3DKMTGetDeviceState
|
||||||
|
WrapFunction D3DKMTGetDisplayModeList
|
||||||
|
WrapFunction D3DKMTGetMultisampleMethodList
|
||||||
|
WrapFunction D3DKMTGetRuntimeData
|
||||||
|
WrapFunction D3DKMTGetSharedPrimaryHandle
|
||||||
|
WrapFunction D3DKMTLock
|
||||||
|
WrapFunction D3DKMTOpenAdapterFromHdc
|
||||||
|
WrapFunction D3DKMTOpenResource
|
||||||
|
WrapFunction D3DKMTPresent
|
||||||
|
WrapFunction D3DKMTQueryAdapterInfo
|
||||||
|
WrapFunction D3DKMTQueryAllocationResidency
|
||||||
|
WrapFunction D3DKMTQueryResourceInfo
|
||||||
|
WrapFunction D3DKMTRender
|
||||||
|
WrapFunction D3DKMTSetAllocationPriority
|
||||||
|
WrapFunction D3DKMTSetContextSchedulingPriority
|
||||||
|
WrapFunction D3DKMTSetDisplayMode
|
||||||
|
WrapFunction D3DKMTSetDisplayPrivateDriverFormat
|
||||||
|
WrapFunction D3DKMTSetGammaRamp
|
||||||
|
WrapFunction D3DKMTSetVidPnSourceOwner
|
||||||
|
WrapFunction D3DKMTSignalSynchronizationObject
|
||||||
|
WrapFunction D3DKMTUnlock
|
||||||
|
WrapFunction D3DKMTWaitForSynchronizationObject
|
||||||
|
WrapFunction D3DKMTWaitForVerticalBlankEvent
|
||||||
|
WrapFunction D3DPerformance_BeginEvent
|
||||||
|
WrapFunction D3DPerformance_EndEvent
|
||||||
|
WrapFunction D3DPerformance_GetStatus
|
||||||
|
WrapFunction D3DPerformance_SetMarker
|
||||||
|
WrapFunction EnableFeatureLevelUpgrade
|
||||||
|
WrapFunction OpenAdapter10
|
||||||
|
WrapFunction OpenAdapter10_2
|
||||||
|
|
||||||
|
WrapFunction XInputGetState
|
||||||
|
WrapFunction XInputSetState
|
||||||
|
WrapFunction XInputGetCapabilities
|
||||||
|
WrapFunction XInputEnable
|
||||||
|
WrapFunction XInputGetDSoundAudioDeviceGuids
|
||||||
|
WrapFunction XInputGetBatteryInformation
|
||||||
|
WrapFunction XInputGetKeystroke
|
||||||
|
WrapFunction XInputGetStateEx
|
||||||
|
WrapFunction XInputWaitForGuideButton
|
||||||
|
WrapFunction XInputCancelGuideButtonWait
|
||||||
|
WrapFunction XInputPowerOffController
|
||||||
|
|
||||||
|
WrapFunction Direct3DShaderValidatorCreate9
|
||||||
|
WrapFunction PSGPError
|
||||||
|
WrapFunction PSGPSampleTexture
|
||||||
|
WrapFunction D3DPERF_BeginEvent
|
||||||
|
WrapFunction D3DPERF_EndEvent
|
||||||
|
WrapFunction D3DPERF_GetStatus
|
||||||
|
WrapFunction D3DPERF_QueryRepeatFrame
|
||||||
|
WrapFunction D3DPERF_SetMarker
|
||||||
|
WrapFunction D3DPERF_SetOptions
|
||||||
|
WrapFunction D3DPERF_SetRegion
|
||||||
|
WrapFunction DebugSetLevel
|
||||||
|
WrapFunction DebugSetMute
|
||||||
|
WrapFunction Direct3D9EnableMaximizedWindowedModeShim
|
||||||
|
WrapFunction Direct3DCreate9
|
||||||
|
WrapFunction Direct3DCreate9Ex
|
||||||
|
|
||||||
|
WrapFunction wglUseFontOutlinesA
|
||||||
|
WrapFunction wglUseFontOutlinesW
|
||||||
|
WrapFunction wglDescribeLayerPlane
|
||||||
|
WrapFunction wglSetLayerPaletteEntries
|
||||||
|
WrapFunction wglGetLayerPaletteEntries
|
||||||
|
WrapFunction wglRealizeLayerPalette
|
||||||
|
WrapFunction wglSwapLayerBuffers
|
||||||
|
WrapFunction wglMakeCurrent
|
||||||
|
WrapFunction GlmfInitPlayback
|
||||||
|
WrapFunction GlmfBeginGlsBlock
|
||||||
|
WrapFunction GlmfPlayGlsRecord
|
||||||
|
WrapFunction GlmfEndGlsBlock
|
||||||
|
WrapFunction GlmfEndPlayback
|
||||||
|
WrapFunction GlmfCloseMetaFile
|
||||||
|
WrapFunction wglSwapMultipleBuffers
|
||||||
|
WrapFunction wglCreateLayerContext
|
||||||
|
WrapFunction wglCreateContext
|
||||||
|
WrapFunction wglDeleteContext
|
||||||
|
WrapFunction wglGetCurrentContext
|
||||||
|
WrapFunction wglGetCurrentDC
|
||||||
|
WrapFunction wglUseFontBitmapsA
|
||||||
|
WrapFunction wglUseFontBitmapsW
|
||||||
|
WrapFunction wglShareLists
|
||||||
|
WrapFunction wglGetDefaultProcAddress
|
||||||
|
WrapFunction wglGetProcAddress
|
||||||
|
WrapFunction wglCopyContext
|
||||||
|
WrapFunction glDebugEntry
|
||||||
|
WrapFunction wglGetPixelFormat
|
||||||
|
WrapFunction wglSetPixelFormat
|
||||||
|
WrapFunction wglChoosePixelFormat
|
||||||
|
WrapFunction wglDescribePixelFormat
|
||||||
|
WrapFunction wglSwapBuffers
|
||||||
|
WrapFunction glCallList
|
||||||
|
WrapFunction glCallLists
|
||||||
|
WrapFunction glBegin
|
||||||
|
WrapFunction glColor3b
|
||||||
|
WrapFunction glColor3bv
|
||||||
|
WrapFunction glColor3d
|
||||||
|
WrapFunction glColor3dv
|
||||||
|
WrapFunction glColor3f
|
||||||
|
WrapFunction glColor3fv
|
||||||
|
WrapFunction glColor3i
|
||||||
|
WrapFunction glColor3iv
|
||||||
|
WrapFunction glColor3s
|
||||||
|
WrapFunction glColor3sv
|
||||||
|
WrapFunction glColor3ub
|
||||||
|
WrapFunction glColor3ubv
|
||||||
|
WrapFunction glColor3ui
|
||||||
|
WrapFunction glColor3uiv
|
||||||
|
WrapFunction glColor3us
|
||||||
|
WrapFunction glColor3usv
|
||||||
|
WrapFunction glColor4b
|
||||||
|
WrapFunction glColor4bv
|
||||||
|
WrapFunction glColor4d
|
||||||
|
WrapFunction glColor4dv
|
||||||
|
WrapFunction glColor4f
|
||||||
|
WrapFunction glColor4fv
|
||||||
|
WrapFunction glColor4i
|
||||||
|
WrapFunction glColor4iv
|
||||||
|
WrapFunction glColor4s
|
||||||
|
WrapFunction glColor4sv
|
||||||
|
WrapFunction glColor4ub
|
||||||
|
WrapFunction glColor4ubv
|
||||||
|
WrapFunction glColor4ui
|
||||||
|
WrapFunction glColor4uiv
|
||||||
|
WrapFunction glColor4us
|
||||||
|
WrapFunction glColor4usv
|
||||||
|
WrapFunction glEdgeFlag
|
||||||
|
WrapFunction glEdgeFlagv
|
||||||
|
WrapFunction glEnd
|
||||||
|
WrapFunction glIndexd
|
||||||
|
WrapFunction glIndexdv
|
||||||
|
WrapFunction glIndexf
|
||||||
|
WrapFunction glIndexfv
|
||||||
|
WrapFunction glIndexi
|
||||||
|
WrapFunction glIndexiv
|
||||||
|
WrapFunction glIndexs
|
||||||
|
WrapFunction glIndexsv
|
||||||
|
WrapFunction glNormal3b
|
||||||
|
WrapFunction glNormal3bv
|
||||||
|
WrapFunction glNormal3d
|
||||||
|
WrapFunction glNormal3dv
|
||||||
|
WrapFunction glNormal3f
|
||||||
|
WrapFunction glNormal3fv
|
||||||
|
WrapFunction glNormal3i
|
||||||
|
WrapFunction glNormal3iv
|
||||||
|
WrapFunction glNormal3s
|
||||||
|
WrapFunction glNormal3sv
|
||||||
|
WrapFunction glTexCoord1d
|
||||||
|
WrapFunction glTexCoord1dv
|
||||||
|
WrapFunction glTexCoord1f
|
||||||
|
WrapFunction glTexCoord1fv
|
||||||
|
WrapFunction glTexCoord1i
|
||||||
|
WrapFunction glTexCoord1iv
|
||||||
|
WrapFunction glTexCoord1s
|
||||||
|
WrapFunction glTexCoord1sv
|
||||||
|
WrapFunction glTexCoord2d
|
||||||
|
WrapFunction glTexCoord2dv
|
||||||
|
WrapFunction glTexCoord2f
|
||||||
|
WrapFunction glTexCoord2fv
|
||||||
|
WrapFunction glTexCoord2i
|
||||||
|
WrapFunction glTexCoord2iv
|
||||||
|
WrapFunction glTexCoord2s
|
||||||
|
WrapFunction glTexCoord2sv
|
||||||
|
WrapFunction glTexCoord3d
|
||||||
|
WrapFunction glTexCoord3dv
|
||||||
|
WrapFunction glTexCoord3f
|
||||||
|
WrapFunction glTexCoord3fv
|
||||||
|
WrapFunction glTexCoord3i
|
||||||
|
WrapFunction glTexCoord3iv
|
||||||
|
WrapFunction glTexCoord3s
|
||||||
|
WrapFunction glTexCoord3sv
|
||||||
|
WrapFunction glTexCoord4d
|
||||||
|
WrapFunction glTexCoord4dv
|
||||||
|
WrapFunction glTexCoord4f
|
||||||
|
WrapFunction glTexCoord4fv
|
||||||
|
WrapFunction glTexCoord4i
|
||||||
|
WrapFunction glTexCoord4iv
|
||||||
|
WrapFunction glTexCoord4s
|
||||||
|
WrapFunction glTexCoord4sv
|
||||||
|
WrapFunction glVertex2d
|
||||||
|
WrapFunction glVertex2dv
|
||||||
|
WrapFunction glVertex2f
|
||||||
|
WrapFunction glVertex2fv
|
||||||
|
WrapFunction glVertex2i
|
||||||
|
WrapFunction glVertex2iv
|
||||||
|
WrapFunction glVertex2s
|
||||||
|
WrapFunction glVertex2sv
|
||||||
|
WrapFunction glVertex3d
|
||||||
|
WrapFunction glVertex3dv
|
||||||
|
WrapFunction glVertex3f
|
||||||
|
WrapFunction glVertex3fv
|
||||||
|
WrapFunction glVertex3i
|
||||||
|
WrapFunction glVertex3iv
|
||||||
|
WrapFunction glVertex3s
|
||||||
|
WrapFunction glVertex3sv
|
||||||
|
WrapFunction glVertex4d
|
||||||
|
WrapFunction glVertex4dv
|
||||||
|
WrapFunction glVertex4f
|
||||||
|
WrapFunction glVertex4fv
|
||||||
|
WrapFunction glVertex4i
|
||||||
|
WrapFunction glVertex4iv
|
||||||
|
WrapFunction glVertex4s
|
||||||
|
WrapFunction glVertex4sv
|
||||||
|
WrapFunction glMaterialf
|
||||||
|
WrapFunction glMaterialfv
|
||||||
|
WrapFunction glMateriali
|
||||||
|
WrapFunction glMaterialiv
|
||||||
|
WrapFunction glDisable
|
||||||
|
WrapFunction glEnable
|
||||||
|
WrapFunction glPopAttrib
|
||||||
|
WrapFunction glPushAttrib
|
||||||
|
WrapFunction glEvalCoord1d
|
||||||
|
WrapFunction glEvalCoord1dv
|
||||||
|
WrapFunction glEvalCoord1f
|
||||||
|
WrapFunction glEvalCoord1fv
|
||||||
|
WrapFunction glEvalCoord2d
|
||||||
|
WrapFunction glEvalCoord2dv
|
||||||
|
WrapFunction glEvalCoord2f
|
||||||
|
WrapFunction glEvalCoord2fv
|
||||||
|
WrapFunction glEvalPoint1
|
||||||
|
WrapFunction glEvalPoint2
|
||||||
|
WrapFunction glLoadIdentity
|
||||||
|
WrapFunction glLoadMatrixf
|
||||||
|
WrapFunction glLoadMatrixd
|
||||||
|
WrapFunction glMatrixMode
|
||||||
|
WrapFunction glMultMatrixf
|
||||||
|
WrapFunction glMultMatrixd
|
||||||
|
WrapFunction glPopMatrix
|
||||||
|
WrapFunction glPushMatrix
|
||||||
|
WrapFunction glRotated
|
||||||
|
WrapFunction glRotatef
|
||||||
|
WrapFunction glScaled
|
||||||
|
WrapFunction glScalef
|
||||||
|
WrapFunction glTranslated
|
||||||
|
WrapFunction glTranslatef
|
||||||
|
WrapFunction glArrayElement
|
||||||
|
WrapFunction glBindTexture
|
||||||
|
WrapFunction glColorPointer
|
||||||
|
WrapFunction glDisableClientState
|
||||||
|
WrapFunction glDrawArrays
|
||||||
|
WrapFunction glDrawElements
|
||||||
|
WrapFunction glEdgeFlagPointer
|
||||||
|
WrapFunction glEnableClientState
|
||||||
|
WrapFunction glIndexPointer
|
||||||
|
WrapFunction glIndexub
|
||||||
|
WrapFunction glIndexubv
|
||||||
|
WrapFunction glInterleavedArrays
|
||||||
|
WrapFunction glNormalPointer
|
||||||
|
WrapFunction glPolygonOffset
|
||||||
|
WrapFunction glTexCoordPointer
|
||||||
|
WrapFunction glVertexPointer
|
||||||
|
WrapFunction glGetPointerv
|
||||||
|
WrapFunction glPopClientAttrib
|
||||||
|
WrapFunction glPushClientAttrib
|
||||||
|
WrapFunction glClear
|
||||||
|
WrapFunction glClearAccum
|
||||||
|
WrapFunction glClearIndex
|
||||||
|
WrapFunction glClearColor
|
||||||
|
WrapFunction glClearStencil
|
||||||
|
WrapFunction glClearDepth
|
||||||
|
WrapFunction glBitmap
|
||||||
|
WrapFunction glTexImage1D
|
||||||
|
WrapFunction glTexImage2D
|
||||||
|
WrapFunction glCopyPixels
|
||||||
|
WrapFunction glReadPixels
|
||||||
|
WrapFunction glDrawPixels
|
||||||
|
WrapFunction glRectd
|
||||||
|
WrapFunction glRectdv
|
||||||
|
WrapFunction glRectf
|
||||||
|
WrapFunction glRectfv
|
||||||
|
WrapFunction glRecti
|
||||||
|
WrapFunction glRectiv
|
||||||
|
WrapFunction glRects
|
||||||
|
WrapFunction glRectsv
|
||||||
|
WrapFunction glEndList
|
||||||
|
WrapFunction glDeleteLists
|
||||||
|
WrapFunction glGenLists
|
||||||
|
WrapFunction glListBase
|
||||||
|
WrapFunction glRasterPos2d
|
||||||
|
WrapFunction glRasterPos2dv
|
||||||
|
WrapFunction glRasterPos2f
|
||||||
|
WrapFunction glRasterPos2fv
|
||||||
|
WrapFunction glRasterPos2i
|
||||||
|
WrapFunction glRasterPos2iv
|
||||||
|
WrapFunction glRasterPos2s
|
||||||
|
WrapFunction glRasterPos2sv
|
||||||
|
WrapFunction glRasterPos3d
|
||||||
|
WrapFunction glRasterPos3dv
|
||||||
|
WrapFunction glRasterPos3f
|
||||||
|
WrapFunction glRasterPos3fv
|
||||||
|
WrapFunction glRasterPos3i
|
||||||
|
WrapFunction glRasterPos3iv
|
||||||
|
WrapFunction glRasterPos3s
|
||||||
|
WrapFunction glRasterPos3sv
|
||||||
|
WrapFunction glRasterPos4d
|
||||||
|
WrapFunction glRasterPos4dv
|
||||||
|
WrapFunction glRasterPos4f
|
||||||
|
WrapFunction glRasterPos4fv
|
||||||
|
WrapFunction glRasterPos4i
|
||||||
|
WrapFunction glRasterPos4iv
|
||||||
|
WrapFunction glRasterPos4s
|
||||||
|
WrapFunction glRasterPos4sv
|
||||||
|
WrapFunction glClipPlane
|
||||||
|
WrapFunction glColorMaterial
|
||||||
|
WrapFunction glCullFace
|
||||||
|
WrapFunction glFogf
|
||||||
|
WrapFunction glFogfv
|
||||||
|
WrapFunction glFogi
|
||||||
|
WrapFunction glFogiv
|
||||||
|
WrapFunction glFrontFace
|
||||||
|
WrapFunction glHint
|
||||||
|
WrapFunction glLightf
|
||||||
|
WrapFunction glLightfv
|
||||||
|
WrapFunction glLighti
|
||||||
|
WrapFunction glLightiv
|
||||||
|
WrapFunction glLightModelf
|
||||||
|
WrapFunction glLightModelfv
|
||||||
|
WrapFunction glLightModeli
|
||||||
|
WrapFunction glLightModeliv
|
||||||
|
WrapFunction glLineStipple
|
||||||
|
WrapFunction glLineWidth
|
||||||
|
WrapFunction glPointSize
|
||||||
|
WrapFunction glPolygonMode
|
||||||
|
WrapFunction glPolygonStipple
|
||||||
|
WrapFunction glFinish
|
||||||
|
WrapFunction glShadeModel
|
||||||
|
WrapFunction glTexParameterf
|
||||||
|
WrapFunction glTexParameterfv
|
||||||
|
WrapFunction glTexParameteri
|
||||||
|
WrapFunction glTexParameteriv
|
||||||
|
WrapFunction glTexEnvf
|
||||||
|
WrapFunction glTexEnvfv
|
||||||
|
WrapFunction glTexEnvi
|
||||||
|
WrapFunction glTexEnviv
|
||||||
|
WrapFunction glTexGend
|
||||||
|
WrapFunction glTexGendv
|
||||||
|
WrapFunction glTexGenf
|
||||||
|
WrapFunction glTexGenfv
|
||||||
|
WrapFunction glTexGeni
|
||||||
|
WrapFunction glTexGeniv
|
||||||
|
WrapFunction glFeedbackBuffer
|
||||||
|
WrapFunction glSelectBuffer
|
||||||
|
WrapFunction glRenderMode
|
||||||
|
WrapFunction glInitNames
|
||||||
|
WrapFunction glLoadName
|
||||||
|
WrapFunction glPassThrough
|
||||||
|
WrapFunction glPopName
|
||||||
|
WrapFunction glPushName
|
||||||
|
WrapFunction glDrawBuffer
|
||||||
|
WrapFunction glStencilMask
|
||||||
|
WrapFunction glColorMask
|
||||||
|
WrapFunction glDepthMask
|
||||||
|
WrapFunction glIndexMask
|
||||||
|
WrapFunction glScissor
|
||||||
|
WrapFunction glNewList
|
||||||
|
WrapFunction glAccum
|
||||||
|
WrapFunction glFlush
|
||||||
|
WrapFunction glMap1d
|
||||||
|
WrapFunction glMap1f
|
||||||
|
WrapFunction glMap2d
|
||||||
|
WrapFunction glMap2f
|
||||||
|
WrapFunction glMapGrid1d
|
||||||
|
WrapFunction glMapGrid1f
|
||||||
|
WrapFunction glMapGrid2d
|
||||||
|
WrapFunction glMapGrid2f
|
||||||
|
WrapFunction glEvalMesh1
|
||||||
|
WrapFunction glEvalMesh2
|
||||||
|
WrapFunction glAlphaFunc
|
||||||
|
WrapFunction glBlendFunc
|
||||||
|
WrapFunction glLogicOp
|
||||||
|
WrapFunction glStencilFunc
|
||||||
|
WrapFunction glStencilOp
|
||||||
|
WrapFunction glDepthFunc
|
||||||
|
WrapFunction glPixelZoom
|
||||||
|
WrapFunction glPixelTransferf
|
||||||
|
WrapFunction glPixelTransferi
|
||||||
|
WrapFunction glPixelStoref
|
||||||
|
WrapFunction glPixelStorei
|
||||||
|
WrapFunction glPixelMapfv
|
||||||
|
WrapFunction glPixelMapuiv
|
||||||
|
WrapFunction glPixelMapusv
|
||||||
|
WrapFunction glReadBuffer
|
||||||
|
WrapFunction glGetBooleanv
|
||||||
|
WrapFunction glGetClipPlane
|
||||||
|
WrapFunction glGetDoublev
|
||||||
|
WrapFunction glGetError
|
||||||
|
WrapFunction glGetFloatv
|
||||||
|
WrapFunction glGetIntegerv
|
||||||
|
WrapFunction glGetLightfv
|
||||||
|
WrapFunction glGetLightiv
|
||||||
|
WrapFunction glGetMapdv
|
||||||
|
WrapFunction glGetMapfv
|
||||||
|
WrapFunction glGetMapiv
|
||||||
|
WrapFunction glGetMaterialfv
|
||||||
|
WrapFunction glGetMaterialiv
|
||||||
|
WrapFunction glGetPixelMapfv
|
||||||
|
WrapFunction glGetPixelMapuiv
|
||||||
|
WrapFunction glGetPixelMapusv
|
||||||
|
WrapFunction glGetPolygonStipple
|
||||||
|
WrapFunction glGetString
|
||||||
|
WrapFunction glGetTexEnvfv
|
||||||
|
WrapFunction glGetTexEnviv
|
||||||
|
WrapFunction glGetTexGendv
|
||||||
|
WrapFunction glGetTexGenfv
|
||||||
|
WrapFunction glGetTexGeniv
|
||||||
|
WrapFunction glGetTexImage
|
||||||
|
WrapFunction glGetTexParameterfv
|
||||||
|
WrapFunction glGetTexParameteriv
|
||||||
|
WrapFunction glGetTexLevelParameterfv
|
||||||
|
WrapFunction glGetTexLevelParameteriv
|
||||||
|
WrapFunction glIsEnabled
|
||||||
|
WrapFunction glIsList
|
||||||
|
WrapFunction glDepthRange
|
||||||
|
WrapFunction glFrustum
|
||||||
|
WrapFunction glOrtho
|
||||||
|
WrapFunction glViewport
|
||||||
|
WrapFunction glAreTexturesResident
|
||||||
|
WrapFunction glCopyTexImage1D
|
||||||
|
WrapFunction glCopyTexImage2D
|
||||||
|
WrapFunction glCopyTexSubImage1D
|
||||||
|
WrapFunction glCopyTexSubImage2D
|
||||||
|
WrapFunction glDeleteTextures
|
||||||
|
WrapFunction glGenTextures
|
||||||
|
WrapFunction glIsTexture
|
||||||
|
WrapFunction glPrioritizeTextures
|
||||||
|
WrapFunction glTexSubImage1D
|
||||||
|
WrapFunction glTexSubImage2D
|
||||||
|
|
||||||
|
WrapFunction PlaySoundW
|
||||||
|
WrapFunction timeSetEvent
|
||||||
|
WrapFunction timeKillEvent
|
||||||
|
WrapFunction midiOutMessage
|
||||||
|
WrapFunction timeBeginPeriod
|
||||||
|
WrapFunction timeGetTime
|
||||||
|
WrapFunction NotifyCallbackData
|
||||||
|
WrapFunction WOW32DriverCallback
|
||||||
|
WrapFunction WOW32ResolveMultiMediaHandle
|
||||||
|
WrapFunction aux32Message
|
||||||
|
WrapFunction joy32Message
|
||||||
|
WrapFunction mid32Message
|
||||||
|
WrapFunction mod32Message
|
||||||
|
WrapFunction mxd32Message
|
||||||
|
WrapFunction tid32Message
|
||||||
|
WrapFunction wid32Message
|
||||||
|
WrapFunction wod32Message
|
||||||
|
WrapFunction mci32Message
|
||||||
|
WrapFunction CloseDriver
|
||||||
|
WrapFunction DefDriverProc
|
||||||
|
WrapFunction DriverCallback
|
||||||
|
WrapFunction DrvGetModuleHandle
|
||||||
|
WrapFunction GetDriverModuleHandle
|
||||||
|
WrapFunction OpenDriver
|
||||||
|
WrapFunction PlaySound
|
||||||
|
WrapFunction Ordinal2
|
||||||
|
WrapFunction SendDriverMessage
|
||||||
|
WrapFunction auxGetDevCapsA
|
||||||
|
WrapFunction auxGetDevCapsW
|
||||||
|
WrapFunction auxGetNumDevs
|
||||||
|
WrapFunction auxGetVolume
|
||||||
|
WrapFunction auxOutMessage
|
||||||
|
WrapFunction auxSetVolume
|
||||||
|
WrapFunction joyConfigChanged
|
||||||
|
WrapFunction joyGetDevCapsA
|
||||||
|
WrapFunction joyGetDevCapsW
|
||||||
|
WrapFunction joyGetNumDevs
|
||||||
|
WrapFunction joyGetPosEx
|
||||||
|
WrapFunction joyGetPos
|
||||||
|
WrapFunction joyGetThreshold
|
||||||
|
WrapFunction joyReleaseCapture
|
||||||
|
WrapFunction joySetCapture
|
||||||
|
WrapFunction joySetThreshold
|
||||||
|
WrapFunction midiConnect
|
||||||
|
WrapFunction midiDisconnect
|
||||||
|
WrapFunction midiInAddBuffer
|
||||||
|
WrapFunction midiInClose
|
||||||
|
WrapFunction midiInGetDevCapsA
|
||||||
|
WrapFunction midiInGetDevCapsW
|
||||||
|
WrapFunction midiInGetErrorTextA
|
||||||
|
WrapFunction midiInGetErrorTextW
|
||||||
|
WrapFunction midiInGetID
|
||||||
|
WrapFunction midiInGetNumDevs
|
||||||
|
WrapFunction midiInMessage
|
||||||
|
WrapFunction midiInOpen
|
||||||
|
WrapFunction midiInPrepareHeader
|
||||||
|
WrapFunction midiInReset
|
||||||
|
WrapFunction midiInStart
|
||||||
|
WrapFunction midiInStop
|
||||||
|
WrapFunction midiInUnprepareHeader
|
||||||
|
WrapFunction midiOutCacheDrumPatches
|
||||||
|
WrapFunction midiOutCachePatches
|
||||||
|
WrapFunction midiOutClose
|
||||||
|
WrapFunction midiOutGetDevCapsA
|
||||||
|
WrapFunction midiOutGetDevCapsW
|
||||||
|
WrapFunction midiOutGetErrorTextA
|
||||||
|
WrapFunction midiOutGetErrorTextW
|
||||||
|
WrapFunction midiOutGetID
|
||||||
|
WrapFunction midiOutGetNumDevs
|
||||||
|
WrapFunction midiOutGetVolume
|
||||||
|
WrapFunction midiOutLongMsg
|
||||||
|
WrapFunction midiOutOpen
|
||||||
|
WrapFunction midiOutPrepareHeader
|
||||||
|
WrapFunction midiOutReset
|
||||||
|
WrapFunction midiOutSetVolume
|
||||||
|
WrapFunction midiOutShortMsg
|
||||||
|
WrapFunction midiOutUnprepareHeader
|
||||||
|
WrapFunction midiStreamClose
|
||||||
|
WrapFunction midiStreamOpen
|
||||||
|
WrapFunction midiStreamOut
|
||||||
|
WrapFunction midiStreamPause
|
||||||
|
WrapFunction midiStreamPosition
|
||||||
|
WrapFunction midiStreamProperty
|
||||||
|
WrapFunction midiStreamRestart
|
||||||
|
WrapFunction midiStreamStop
|
||||||
|
WrapFunction mixerClose
|
||||||
|
WrapFunction mixerGetControlDetailsA
|
||||||
|
WrapFunction mixerGetControlDetailsW
|
||||||
|
WrapFunction mixerGetDevCapsA
|
||||||
|
WrapFunction mixerGetDevCapsW
|
||||||
|
WrapFunction mixerGetID
|
||||||
|
WrapFunction mixerGetLineControlsA
|
||||||
|
WrapFunction mixerGetLineControlsW
|
||||||
|
WrapFunction mixerGetLineInfoA
|
||||||
|
WrapFunction mixerGetLineInfoW
|
||||||
|
WrapFunction mixerGetNumDevs
|
||||||
|
WrapFunction mixerMessage
|
||||||
|
WrapFunction mixerOpen
|
||||||
|
WrapFunction mixerSetControlDetails
|
||||||
|
WrapFunction mmDrvInstall
|
||||||
|
WrapFunction mmGetCurrentTask
|
||||||
|
WrapFunction mmTaskBlock
|
||||||
|
WrapFunction mmTaskCreate
|
||||||
|
WrapFunction mmTaskSignal
|
||||||
|
WrapFunction mmTaskYield
|
||||||
|
WrapFunction mmioAdvance
|
||||||
|
WrapFunction mmioAscend
|
||||||
|
WrapFunction mmioClose
|
||||||
|
WrapFunction mmioCreateChunk
|
||||||
|
WrapFunction mmioDescend
|
||||||
|
WrapFunction mmioFlush
|
||||||
|
WrapFunction mmioGetInfo
|
||||||
|
WrapFunction mmioInstallIOProcA
|
||||||
|
WrapFunction mmioInstallIOProcW
|
||||||
|
WrapFunction mmioOpenA
|
||||||
|
WrapFunction mmioOpenW
|
||||||
|
WrapFunction mmioRead
|
||||||
|
WrapFunction mmioRenameA
|
||||||
|
WrapFunction mmioRenameW
|
||||||
|
WrapFunction mmioSeek
|
||||||
|
WrapFunction mmioSendMessage
|
||||||
|
WrapFunction mmioSetBuffer
|
||||||
|
WrapFunction mmioSetInfo
|
||||||
|
WrapFunction mmioStringToFOURCCA
|
||||||
|
WrapFunction mmioStringToFOURCCW
|
||||||
|
WrapFunction mmioWrite
|
||||||
|
WrapFunction timeEndPeriod
|
||||||
|
WrapFunction timeGetDevCaps
|
||||||
|
WrapFunction timeGetSystemTime
|
||||||
|
WrapFunction waveInAddBuffer
|
||||||
|
WrapFunction waveInClose
|
||||||
|
WrapFunction waveInGetDevCapsA
|
||||||
|
WrapFunction waveInGetDevCapsW
|
||||||
|
WrapFunction waveInGetErrorTextA
|
||||||
|
WrapFunction waveInGetErrorTextW
|
||||||
|
WrapFunction waveInGetID
|
||||||
|
WrapFunction waveInGetNumDevs
|
||||||
|
WrapFunction waveInGetPosition
|
||||||
|
WrapFunction waveInMessage
|
||||||
|
WrapFunction waveInOpen
|
||||||
|
WrapFunction waveInPrepareHeader
|
||||||
|
WrapFunction waveInReset
|
||||||
|
WrapFunction waveInStart
|
||||||
|
WrapFunction waveInStop
|
||||||
|
WrapFunction waveInUnprepareHeader
|
||||||
|
WrapFunction waveOutBreakLoop
|
||||||
|
WrapFunction waveOutClose
|
||||||
|
WrapFunction waveOutGetDevCapsA
|
||||||
|
WrapFunction waveOutGetDevCapsW
|
||||||
|
WrapFunction waveOutGetErrorTextA
|
||||||
|
WrapFunction waveOutGetErrorTextW
|
||||||
|
WrapFunction waveOutGetID
|
||||||
|
WrapFunction waveOutGetNumDevs
|
||||||
|
WrapFunction waveOutGetPitch
|
||||||
|
WrapFunction waveOutGetPlaybackRate
|
||||||
|
WrapFunction waveOutGetPosition
|
||||||
|
WrapFunction waveOutGetVolume
|
||||||
|
WrapFunction waveOutMessage
|
||||||
|
WrapFunction waveOutOpen
|
||||||
|
WrapFunction waveOutPause
|
||||||
|
WrapFunction waveOutPrepareHeader
|
||||||
|
WrapFunction waveOutReset
|
||||||
|
WrapFunction waveOutRestart
|
||||||
|
WrapFunction waveOutSetPitch
|
||||||
|
WrapFunction waveOutSetPlaybackRate
|
||||||
|
WrapFunction waveOutSetVolume
|
||||||
|
WrapFunction waveOutUnprepareHeader
|
||||||
|
WrapFunction waveOutWrite
|
||||||
|
WrapFunction mciExecute
|
||||||
|
WrapFunction mciGetErrorStringA
|
||||||
|
WrapFunction mciGetErrorStringW
|
||||||
|
WrapFunction mciSendCommandA
|
||||||
|
WrapFunction mciSendCommandW
|
||||||
|
WrapFunction mciSendStringA
|
||||||
|
WrapFunction mciSendStringW
|
||||||
|
WrapFunction mciFreeCommandResource
|
||||||
|
WrapFunction mciLoadCommandResource
|
||||||
|
WrapFunction mciDriverNotify
|
||||||
|
WrapFunction mciDriverYield
|
||||||
|
WrapFunction mciGetCreatorTask
|
||||||
|
WrapFunction mciGetDeviceIDA
|
||||||
|
WrapFunction mciGetDeviceIDFromElementIDA
|
||||||
|
WrapFunction mciGetDeviceIDFromElementIDW
|
||||||
|
WrapFunction mciGetDeviceIDW
|
||||||
|
WrapFunction mciGetDriverData
|
||||||
|
WrapFunction mciGetYieldProc
|
||||||
|
WrapFunction mciSetDriverData
|
||||||
|
WrapFunction mciSetYieldProc
|
||||||
|
WrapFunction PlaySoundA
|
||||||
|
WrapFunction sndPlaySoundA
|
||||||
|
WrapFunction sndPlaySoundW
|
||||||
|
WrapFunction WOWAppExit
|
||||||
|
WrapFunction mmsystemGetVersion
|
||||||
|
|
||||||
|
_TEXT ENDS
|
||||||
|
END
|
33
Dinput8Wrapper.sln
Normal file
33
Dinput8Wrapper.sln
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.27130.2036
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DInput8Wrapper", "Dinput8Wrapper.vcxproj", "{023441F6-2554-440F-9FFB-7E185AB7CF41}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Includes", "Includes", "{3E1C2D29-081D-4B1D-9453-5A1F19212119}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Debug|x86.ActiveCfg = Release|Win32
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Debug|x86.Build.0 = Release|Win32
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Release|x64.Build.0 = Release|x64
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{023441F6-2554-440F-9FFB-7E185AB7CF41}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {3C21D57D-0941-43AE-883F-929E3C8A82E1}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
374
Dinput8Wrapper.vcxproj
Normal file
374
Dinput8Wrapper.vcxproj
Normal file
@ -0,0 +1,374 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Game Files\ButtonRumble64bit.h" />
|
||||||
|
<ClInclude Include="Game Files\OutRun2Real.h" />
|
||||||
|
<ClInclude Include="Game Files\Mame019964bit.h" />
|
||||||
|
<ClInclude Include="Game Files\Mame020664bit.h" />
|
||||||
|
<ClInclude Include="Game Files\ButtonRumble32bit.h" />
|
||||||
|
<ClInclude Include="Game Files\Demul.h" />
|
||||||
|
<ClInclude Include="dinput8.def">
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Mame020632bit.h" />
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDX1.10.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD5.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD4Japan.h" />
|
||||||
|
<ClInclude Include="Game Files\M2Emulator.h" />
|
||||||
|
<ClInclude Include="Game Files\RoadFighters3D.h" />
|
||||||
|
<ClInclude Include="Game Files\LGI.h" />
|
||||||
|
<ClInclude Include="Game Files\LGI3D.h" />
|
||||||
|
<None Include="Config\FFBPlugin.ini">
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
</None>
|
||||||
|
<None Include="Includes\SDL2.dll" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Game Files\ButtonRumble64bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame019964bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame020664bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\ButtonRumble32bit.cpp" />
|
||||||
|
<ClCompile Include="Common Files\TeknoParrotGame.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Demul.cpp" />
|
||||||
|
<ClCompile Include="Game Files\AfterburnerClimax.cpp" />
|
||||||
|
<ClCompile Include="Game Files\BG4JP.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Daytona3.cpp" />
|
||||||
|
<ClCompile Include="DllMain.cpp" />
|
||||||
|
<ClCompile Include="Common Files\Game.cpp" />
|
||||||
|
<ClCompile Include="Game Files\ChaseHQ2.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD4.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD6.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD7.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD8.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Machstorm.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame020632bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\OutRun2Fake.cpp" />
|
||||||
|
<ClCompile Include="Game Files\PokkenTournament.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SegaRally3.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SegaRacingClassic.cpp" />
|
||||||
|
<ClCompile Include="Game Files\FordRacing.cpp" />
|
||||||
|
<ClCompile Include="Game Files\FNF.cpp" />
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDX.cpp" />
|
||||||
|
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp" />
|
||||||
|
<ClCompile Include="Game Files\TestGame.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame019932bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\WackyRaces.cpp" />
|
||||||
|
<ClCompile Include="Game Files\WMMT5.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD4Japan.cpp" />
|
||||||
|
<ClCompile Include="Game Files\GTIClub3.cpp" />
|
||||||
|
<ClCompile Include="IDirectInputDevice.cpp" />
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDX1.10.cpp" />
|
||||||
|
<ClCompile Include="Game Files\InitialD5.cpp" />
|
||||||
|
<ClCompile Include="Game Files\M2Emulator.cpp" />
|
||||||
|
<ClCompile Include="Game Files\RoadFighters3D.cpp" />
|
||||||
|
<ClCompile Include="Game Files\LGI.cpp" />
|
||||||
|
<ClCompile Include="Game Files\LGI3D.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Common Files\TeknoParrotGame.h" />
|
||||||
|
<ClInclude Include="Game Files\AfterburnerClimax.h" />
|
||||||
|
<ClInclude Include="Game Files\BG4JP.h" />
|
||||||
|
<ClInclude Include="Game Files\Daytona3.h" />
|
||||||
|
<ClInclude Include="Common Files\Game.h" />
|
||||||
|
<ClInclude Include="Game Files\ChaseHQ2.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD4.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD6.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD7.h" />
|
||||||
|
<ClInclude Include="Game Files\InitialD8.h" />
|
||||||
|
<ClInclude Include="Game Files\Machstorm.h" />
|
||||||
|
<ClInclude Include="Game Files\OutRun2Fake.h" />
|
||||||
|
<ClInclude Include="Game Files\PokkenTournament.h" />
|
||||||
|
<ClInclude Include="Game Files\SegaRally3.h" />
|
||||||
|
<ClInclude Include="Game Files\SegaRacingClassic.h" />
|
||||||
|
<ClInclude Include="Game Files\FordRacing.h" />
|
||||||
|
<ClInclude Include="Game Files\FNF.h" />
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDX.h" />
|
||||||
|
<ClInclude Include="Game Files\SonicSegaAllStarsRacing.h" />
|
||||||
|
<ClInclude Include="Game Files\TestGame.h" />
|
||||||
|
<ClInclude Include="Game Files\Mame019932bit.h" />
|
||||||
|
<ClInclude Include="Game Files\WackyRaces.h" />
|
||||||
|
<ClInclude Include="Game Files\WMMT5.h" />
|
||||||
|
<ClInclude Include="Game Files\GTIClub3.h" />
|
||||||
|
<ClInclude Include="IDirectInputDevice.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="Includes\FFBPlugin.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<MASM Include="DLLWrapper.asm" />
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{023441F6-2554-440F-9FFB-7E185AB7CF41}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>Dinput8Wrapper</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
|
||||||
|
<ProjectName>DInput8Wrapper</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v141</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>false</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)$(Configuration).$(Platform)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)$(Configuration).$(Platform)\$(ProjectName)\</IntDir>
|
||||||
|
<TargetName>dinput8</TargetName>
|
||||||
|
<EmbedManifest>false</EmbedManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)$(Configuration).$(Platform)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)$(Configuration).$(Platform)\$(ProjectName)</IntDir>
|
||||||
|
<TargetName>dinput8</TargetName>
|
||||||
|
<EmbedManifest>false</EmbedManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)$(Configuration).$(Platform)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)$(Configuration).$(Platform)\$(ProjectName)\</IntDir>
|
||||||
|
<TargetName>dinput8</TargetName>
|
||||||
|
<EmbedManifest>false</EmbedManifest>
|
||||||
|
<IncludePath>$(SolutionDir)\Xidi-master\Include\Xidi;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
<SourcePath>$(VC_SourcePath)</SourcePath>
|
||||||
|
<CustomBuildAfterTargets>sdl2_init</CustomBuildAfterTargets>
|
||||||
|
<MASMAfterTargets>CoreBuild</MASMAfterTargets>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<OutDir>$(SolutionDir)$(Configuration).$(Platform)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)$(Configuration).$(Platform)\$(ProjectName)\</IntDir>
|
||||||
|
<TargetName>dinput8</TargetName>
|
||||||
|
<EmbedManifest>false</EmbedManifest>
|
||||||
|
<IncludePath>$(SolutionDir)\Xidi-master\Include\Xidi;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DIRECTINPUT_VERSION=0x0800;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<AdditionalIncludeDirectories>Include/$(SolutionName)</AdditionalIncludeDirectories>
|
||||||
|
<ForcedIncludeFiles>
|
||||||
|
</ForcedIncludeFiles>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||||
|
<ModuleDefinitionFile>dinput8.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;xinput.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<ResourceCompile>
|
||||||
|
<AdditionalIncludeDirectories>Resources</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<NullTerminateStrings>true</NullTerminateStrings>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Manifest>
|
||||||
|
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
|
||||||
|
</Manifest>
|
||||||
|
<ManifestResourceCompile>
|
||||||
|
<ResourceOutputFileName>$(IntDir)$(TargetName)$(TargetExt).embed.manifest.res</ResourceOutputFileName>
|
||||||
|
</ManifestResourceCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DIRECTINPUT_VERSION=0x0800;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<MinimalRebuild>false</MinimalRebuild>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<AdditionalIncludeDirectories>Include/$(SolutionName)</AdditionalIncludeDirectories>
|
||||||
|
<ForcedIncludeFiles>
|
||||||
|
</ForcedIncludeFiles>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<GenerateDebugInformation>Debug</GenerateDebugInformation>
|
||||||
|
<ModuleDefinitionFile>dinput8.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;xinput.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<ResourceCompile>
|
||||||
|
<AdditionalIncludeDirectories>Resources</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<NullTerminateStrings>true</NullTerminateStrings>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Manifest>
|
||||||
|
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
|
||||||
|
</Manifest>
|
||||||
|
<ManifestResourceCompile>
|
||||||
|
<ResourceOutputFileName>$(IntDir)$(TargetName)$(TargetExt).embed.manifest.res</ResourceOutputFileName>
|
||||||
|
</ManifestResourceCompile>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DIRECTINPUT_VERSION=0x0800;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<AdditionalIncludeDirectories>Include/$(SolutionName)</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||||
|
<ModuleDefinitionFile>dinput8.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
<ImageHasSafeExceptionHandlers />
|
||||||
|
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
|
||||||
|
</Link>
|
||||||
|
<ResourceCompile>
|
||||||
|
<AdditionalIncludeDirectories>Resources</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<NullTerminateStrings>true</NullTerminateStrings>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Manifest>
|
||||||
|
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
|
||||||
|
</Manifest>
|
||||||
|
<ManifestResourceCompile>
|
||||||
|
<ResourceOutputFileName>$(IntDir)$(TargetName)$(TargetExt).embed.manifest.res</ResourceOutputFileName>
|
||||||
|
</ManifestResourceCompile>
|
||||||
|
<PostBuildEvent>
|
||||||
|
<Command>xcopy /y "$(ProjectDir)Includes\*" "$(OutDir)"
|
||||||
|
if not exist "$(ProjectDir)Post-Build\node_modules" (cd "$(ProjectDir)Post-Build\" && npm install)
|
||||||
|
node "$(ProjectDir)Post-Build\build.js" "$(ProjectDir)Config\FFBPlugin.ini" "$(OutDir)\" "$(OutDir)\"
|
||||||
|
$(ProjectDir)Post-Build\copydlls.bat "$(OutDir)"</Command>
|
||||||
|
</PostBuildEvent>
|
||||||
|
<CustomBuildStep>
|
||||||
|
<Command>echo HELLO WORLD
|
||||||
|
cd $(OutDir) &amp;&amp; for /D /r %d in (.\Deploy\*) do @xcopy *.dll %d\ /y</Command>
|
||||||
|
<TreatOutputAsContent>
|
||||||
|
</TreatOutputAsContent>
|
||||||
|
</CustomBuildStep>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>
|
||||||
|
</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DIRECTINPUT_VERSION=0x0800;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<SDLCheck>true</SDLCheck>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<OmitFramePointers>false</OmitFramePointers>
|
||||||
|
<RuntimeTypeInfo>false</RuntimeTypeInfo>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<AdditionalIncludeDirectories>Include/$(SolutionName)</AdditionalIncludeDirectories>
|
||||||
|
<ForcedIncludeFiles>
|
||||||
|
</ForcedIncludeFiles>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Windows</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>No</GenerateDebugInformation>
|
||||||
|
<ModuleDefinitionFile>dinput8.def</ModuleDefinitionFile>
|
||||||
|
<AdditionalDependencies>dinput8.lib;dxguid.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
<ResourceCompile>
|
||||||
|
<AdditionalIncludeDirectories>Resources</AdditionalIncludeDirectories>
|
||||||
|
</ResourceCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<NullTerminateStrings>true</NullTerminateStrings>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Manifest>
|
||||||
|
<OutputManifestFile>$(IntDir)$(TargetName)$(TargetExt).embed.manifest</OutputManifestFile>
|
||||||
|
</Manifest>
|
||||||
|
<ManifestResourceCompile>
|
||||||
|
<ResourceOutputFileName>$(IntDir)$(TargetName)$(TargetExt).embed.manifest.res</ResourceOutputFileName>
|
||||||
|
</ManifestResourceCompile>
|
||||||
|
<PreBuildEvent>
|
||||||
|
<Command>
|
||||||
|
</Command>
|
||||||
|
</PreBuildEvent>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
|
||||||
|
<Import Project="packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets" Condition="Exists('packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" />
|
||||||
|
<Import Project="packages\sdl2.2.0.5\build\native\sdl2.targets" Condition="Exists('packages\sdl2.2.0.5\build\native\sdl2.targets')" />
|
||||||
|
</ImportGroup>
|
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Error Condition="!Exists('packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.redist.2.0.5\build\native\sdl2.redist.targets'))" />
|
||||||
|
<Error Condition="!Exists('packages\sdl2.2.0.5\build\native\sdl2.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\sdl2.2.0.5\build\native\sdl2.targets'))" />
|
||||||
|
</Target>
|
||||||
|
</Project>
|
248
Dinput8Wrapper.vcxproj.filters
Normal file
248
Dinput8Wrapper.vcxproj.filters
Normal file
@ -0,0 +1,248 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Game Files">
|
||||||
|
<UniqueIdentifier>{10dc908c-9b3a-4fb8-835f-9be8d32a1424}</UniqueIdentifier>
|
||||||
|
<Extensions>Game Files\</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Common Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Config\FFBPlugin.ini" />
|
||||||
|
<None Include="Includes\SDL2.dll" />
|
||||||
|
<None Include="packages.config" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="DllMain.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Daytona3.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Common Files\Game.cpp" />
|
||||||
|
<ClCompile Include="Game Files\WackyRaces.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\SegaRacingClassic.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\SegaRally3.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\FordRacing.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\WMMT5.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD6.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\TestGame.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="IDirectInputDevice.cpp" />
|
||||||
|
<ClCompile Include="Game Files\ChaseHQ2.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Common Files\TeknoParrotGame.cpp" />
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDX.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\FNF.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\BG4JP.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\AfterburnerClimax.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD4.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD7.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD8.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\Machstorm.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\PokkenTournament.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\MarioKartGPDX1.10.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\SonicSegaAllStarsRacing.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD5.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\InitialD4Japan.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\M2Emulator.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\Demul.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\GTIClub3.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\RoadFighters3D.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\LGI.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\LGI3D.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\Mame020632bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame020664bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\Mame019932bit.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\Mame019964bit.cpp" />
|
||||||
|
<ClCompile Include="Game Files\OutRun2Real.cpp" />
|
||||||
|
<ClCompile Include="Game Files\OutRun2Fake.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\ButtonRumble32bit.cpp">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Game Files\ButtonRumble64bit.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Game Files\Daytona3.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Common Files\Game.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\WackyRaces.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\SegaRacingClassic.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\SegaRally3.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\FordRacing.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\WMMT5.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD6.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\TestGame.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="IDirectInputDevice.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\ChaseHQ2.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Common Files\TeknoParrotGame.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDX.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\FNF.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\BG4JP.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="dinput8.def" />
|
||||||
|
<ClInclude Include="Game Files\AfterburnerClimax.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD4.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD7.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD8.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Machstorm.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\PokkenTournament.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\MarioKartGPDX1.10.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\SonicSegaAllStarsRacing.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD5.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\InitialD4Japan.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\M2Emulator.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Demul.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\GTIClub3.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\RoadFighters3D.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\LGI.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\LGI3D.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Mame020632bit.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Mame020664bit.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Mame019932bit.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\Mame019964bit.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\OutRun2Fake.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\OutRun2Real.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\ButtonRumble32bit.h">
|
||||||
|
<Filter>Game Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Game Files\ButtonRumble64bit.h">
|
||||||
|
<Filter>Common Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Text Include="Includes\FFBPlugin.txt" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<MASM Include="DLLWrapper.asm" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
6
Dinput8Wrapper.vcxproj.user
Normal file
6
Dinput8Wrapper.vcxproj.user
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<ShowAllFiles>true</ShowAllFiles>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
2399
DllMain.cpp
Normal file
2399
DllMain.cpp
Normal file
File diff suppressed because it is too large
Load Diff
27
Game Files/AfterburnerClimax.cpp
Normal file
27
Game Files/AfterburnerClimax.cpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "AfterburnerClimax.h"
|
||||||
|
void AfterburnerClimax::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
UINT8 ff = helpers->ReadByte(0x08347A5E, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int Rumble1Strength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Rumble1Strength"), 0, settingsFilename);
|
||||||
|
int Rumble2Strength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Rumble2Strength"), 0, settingsFilename);
|
||||||
|
int Rumble1Length = GetPrivateProfileInt(TEXT("Settings"), TEXT("Rumble1Length"), 0, settingsFilename);
|
||||||
|
int Rumble2Length = GetPrivateProfileInt(TEXT("Settings"), TEXT("Rumble2Length"), 0, settingsFilename);
|
||||||
|
|
||||||
|
if (ff == 64)
|
||||||
|
{
|
||||||
|
double percentForce = ((Rumble1Strength) / 100.0);
|
||||||
|
double percentLength = (Rumble1Length);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (ff == 80)
|
||||||
|
{
|
||||||
|
double percentForce = ((Rumble2Strength) / 100.0);
|
||||||
|
double percentLength = (Rumble2Length);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/AfterburnerClimax.h
Normal file
7
Game Files/AfterburnerClimax.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class AfterburnerClimax : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
155
Game Files/BG4JP.cpp
Normal file
155
Game Files/BG4JP.cpp
Normal file
@ -0,0 +1,155 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "BG4JP.h"
|
||||||
|
|
||||||
|
void BG4JP::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
int ff = helpers->ReadInt32(0x42EBB0, /* isRelativeOffset */ true);
|
||||||
|
float ffspeed = helpers->ReadFloat32(0x3F3000, /* isRelativeOffset */ true);
|
||||||
|
float ff2 = helpers->ReadFloat32(0x42EAB4, /* isRelativeOffset */ true);
|
||||||
|
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 0.1) & (ffspeed <= 15))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 0.1) & (ffspeed <= 15))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 15.01) & (ffspeed <= 35))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 15.01) & (ffspeed <= 35))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 35.01) & (ffspeed <= 55))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = (250);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 35.01) & (ffspeed <= 55))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = (250);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 55.01) & (ffspeed <= 75))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = (280);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 55.01) & (ffspeed <= 75))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = (280);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 75.01) & (ffspeed <= 90))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = (320);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 75.01) & (ffspeed <= 90))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = (320);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 90.01) & (ffspeed <= 110))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = (370);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 90.01) & (ffspeed <= 110))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = (370);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 110.01) & (ffspeed <= 130))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 110.01) & (ffspeed <= 130))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed >= 130.01) & (ffspeed <= 150))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = (450);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed >= 130.01) & (ffspeed <= 150))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = (450);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((2000000 < ff) & (ff < 4000000) & (ffspeed > 150.01))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = (500);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((1000000 < ff) & (ff < 1600000) & (ffspeed > 150.01))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = (500);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((0.00000000000000000001 < ff2) & (ffspeed > 0.01))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((0.00000000000000000001 > ff2) & (ffspeed > 0.01))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/BG4JP.h
Normal file
8
Game Files/BG4JP.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class BG4JP : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
318
Game Files/ButtonRumble32bit.cpp
Normal file
318
Game Files/ButtonRumble32bit.cpp
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "ButtonRumble32bit.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
extern int joystick_index1;
|
||||||
|
extern int joystick_index2;
|
||||||
|
extern SDL_Joystick* GameController2;
|
||||||
|
extern SDL_Haptic* ControllerHaptic2;
|
||||||
|
extern SDL_Haptic* haptic2;
|
||||||
|
|
||||||
|
void ButtonRumble32bit::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int ShowButtonNumbersForSetup = GetPrivateProfileInt(TEXT("Settings"), TEXT("ShowButtonNumbersForSetup"), 0, settingsFilename);
|
||||||
|
int BothRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("BothRumbleMotor"), 0, settingsFilename);
|
||||||
|
int LeftRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("LeftRumbleMotor"), 0, settingsFilename);
|
||||||
|
int RightRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("RightRumbleMotor"), 0, settingsFilename);
|
||||||
|
int RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleStrength"), 0, settingsFilename);
|
||||||
|
int RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleLength"), 0, settingsFilename);
|
||||||
|
int Button1Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Rumble"), 0, settingsFilename);
|
||||||
|
int Button2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Rumble"), 0, settingsFilename);
|
||||||
|
int Button3Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Rumble"), 0, settingsFilename);
|
||||||
|
int Button4Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Rumble"), 0, settingsFilename);
|
||||||
|
int Button5Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Rumble"), 0, settingsFilename);
|
||||||
|
int Button6Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Rumble"), 0, settingsFilename);
|
||||||
|
int Button7Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Rumble"), 0, settingsFilename);
|
||||||
|
int Button8Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Rumble"), 0, settingsFilename);
|
||||||
|
int Button9Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Rumble"), 0, settingsFilename);
|
||||||
|
int Button10Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Rumble"), 0, settingsFilename);
|
||||||
|
int Button1Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button2Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button3Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button4Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button5Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button6Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button7Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button8Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button9Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button10Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Device2Rumble"), 0, settingsFilename);
|
||||||
|
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
wchar_t * deviceGUIDString2 = new wchar_t[256];
|
||||||
|
int Device2GUID = GetPrivateProfileString(TEXT("Settings"), TEXT("Device2GUID"), NULL, deviceGUIDString2, 256, settingsFilename);
|
||||||
|
char joystick_guid[256];
|
||||||
|
sprintf(joystick_guid, "%S", deviceGUIDString2);
|
||||||
|
SDL_JoystickGUID guid, dev_guid;
|
||||||
|
int numJoysticks = SDL_NumJoysticks();
|
||||||
|
std::string njs = std::to_string(numJoysticks);
|
||||||
|
((char)njs.c_str());
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
extern int joystick1Index;
|
||||||
|
if (i == joystick1Index)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SDL_Joystick* js2 = SDL_JoystickOpen(i);
|
||||||
|
joystick_index2 = SDL_JoystickInstanceID(js2);
|
||||||
|
SDL_JoystickGUID guid = SDL_JoystickGetGUID(js2);
|
||||||
|
char guid_str[1024];
|
||||||
|
SDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str));
|
||||||
|
const char* name = SDL_JoystickName(js2);
|
||||||
|
char text[256];
|
||||||
|
sprintf(text, "Joystick: %d / Name: %s / GUID: %s\n", i, name, guid_str);
|
||||||
|
guid = SDL_JoystickGetGUIDFromString(joystick_guid);
|
||||||
|
dev_guid = SDL_JoystickGetGUID(js2);
|
||||||
|
if (!memcmp(&guid, &dev_guid, sizeof(SDL_JoystickGUID)))
|
||||||
|
{
|
||||||
|
GameController2 = SDL_JoystickOpen(i);
|
||||||
|
ControllerHaptic2 = SDL_HapticOpenFromJoystick(GameController2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SDL_JoystickClose(js2);
|
||||||
|
}
|
||||||
|
haptic2 = ControllerHaptic2;
|
||||||
|
if ((SDL_HapticRumbleSupported(haptic2) == SDL_TRUE))
|
||||||
|
{
|
||||||
|
SDL_HapticRumbleInit;
|
||||||
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Event e;
|
||||||
|
while (SDL_PollEvent(&e) != 0)
|
||||||
|
{
|
||||||
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
|
{
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == 0)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 1)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 2)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 3)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 4)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 5)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 6)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 7)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 8)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 9)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 10)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 11)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 12)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 13)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 14)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 15)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 16)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 16 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 17)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 17 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 18)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 18 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 19)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 19 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 20)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 20 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 21)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 21 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 22)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 22 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 23)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 23 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 24)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 24 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 25)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 25 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 26)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 26 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 27)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 27 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 28)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 28 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 29)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 29 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 30)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 30 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
{
|
||||||
|
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.jaxis.which == joystick_index2)
|
||||||
|
{
|
||||||
|
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.type == SDL_JOYBUTTONUP)
|
||||||
|
{
|
||||||
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(0, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.jaxis.which == joystick_index2)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(0, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/ButtonRumble32bit.h
Normal file
7
Game Files/ButtonRumble32bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class ButtonRumble32bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
318
Game Files/ButtonRumble64bit.cpp
Normal file
318
Game Files/ButtonRumble64bit.cpp
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "ButtonRumble64bit.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
extern int joystick_index1;
|
||||||
|
extern int joystick_index2;
|
||||||
|
extern SDL_Joystick* GameController2;
|
||||||
|
extern SDL_Haptic* ControllerHaptic2;
|
||||||
|
extern SDL_Haptic* haptic2;
|
||||||
|
|
||||||
|
void ButtonRumble64bit::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int ShowButtonNumbersForSetup = GetPrivateProfileInt(TEXT("Settings"), TEXT("ShowButtonNumbersForSetup"), 0, settingsFilename);
|
||||||
|
int BothRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("BothRumbleMotor"), 0, settingsFilename);
|
||||||
|
int LeftRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("LeftRumbleMotor"), 0, settingsFilename);
|
||||||
|
int RightRumbleMotor = GetPrivateProfileInt(TEXT("Settings"), TEXT("RightRumbleMotor"), 0, settingsFilename);
|
||||||
|
int RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleStrength"), 0, settingsFilename);
|
||||||
|
int RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleLength"), 0, settingsFilename);
|
||||||
|
int Button1Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Rumble"), 0, settingsFilename);
|
||||||
|
int Button2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Rumble"), 0, settingsFilename);
|
||||||
|
int Button3Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Rumble"), 0, settingsFilename);
|
||||||
|
int Button4Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Rumble"), 0, settingsFilename);
|
||||||
|
int Button5Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Rumble"), 0, settingsFilename);
|
||||||
|
int Button6Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Rumble"), 0, settingsFilename);
|
||||||
|
int Button7Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Rumble"), 0, settingsFilename);
|
||||||
|
int Button8Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Rumble"), 0, settingsFilename);
|
||||||
|
int Button9Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Rumble"), 0, settingsFilename);
|
||||||
|
int Button10Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Rumble"), 0, settingsFilename);
|
||||||
|
int Button1Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button1Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button2Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button2Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button3Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button3Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button4Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button4Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button5Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button5Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button6Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button6Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button7Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button7Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button8Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button8Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button9Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button9Device2Rumble"), 0, settingsFilename);
|
||||||
|
int Button10Device2Rumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("Button10Device2Rumble"), 0, settingsFilename);
|
||||||
|
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
wchar_t * deviceGUIDString2 = new wchar_t[256];
|
||||||
|
int Device2GUID = GetPrivateProfileString(TEXT("Settings"), TEXT("Device2GUID"), NULL, deviceGUIDString2, 256, settingsFilename);
|
||||||
|
char joystick_guid[256];
|
||||||
|
sprintf(joystick_guid, "%S", deviceGUIDString2);
|
||||||
|
SDL_JoystickGUID guid, dev_guid;
|
||||||
|
int numJoysticks = SDL_NumJoysticks();
|
||||||
|
std::string njs = std::to_string(numJoysticks);
|
||||||
|
((char)njs.c_str());
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
extern int joystick1Index;
|
||||||
|
if (i == joystick1Index)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SDL_Joystick* js2 = SDL_JoystickOpen(i);
|
||||||
|
joystick_index2 = SDL_JoystickInstanceID(js2);
|
||||||
|
SDL_JoystickGUID guid = SDL_JoystickGetGUID(js2);
|
||||||
|
char guid_str[1024];
|
||||||
|
SDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str));
|
||||||
|
const char* name = SDL_JoystickName(js2);
|
||||||
|
char text[256];
|
||||||
|
sprintf(text, "Joystick: %d / Name: %s / GUID: %s\n", i, name, guid_str);
|
||||||
|
guid = SDL_JoystickGetGUIDFromString(joystick_guid);
|
||||||
|
dev_guid = SDL_JoystickGetGUID(js2);
|
||||||
|
if (!memcmp(&guid, &dev_guid, sizeof(SDL_JoystickGUID)))
|
||||||
|
{
|
||||||
|
GameController2 = SDL_JoystickOpen(i);
|
||||||
|
ControllerHaptic2 = SDL_HapticOpenFromJoystick(GameController2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SDL_JoystickClose(js2);
|
||||||
|
}
|
||||||
|
haptic2 = ControllerHaptic2;
|
||||||
|
if ((SDL_HapticRumbleSupported(haptic2) == SDL_TRUE))
|
||||||
|
{
|
||||||
|
SDL_HapticRumbleInit;
|
||||||
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Event e;
|
||||||
|
while (SDL_PollEvent(&e) != 0)
|
||||||
|
{
|
||||||
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
|
{
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == 0)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 1)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 2)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 3)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 4)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 5)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 6)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 7)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 8)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 9)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 10)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 11)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 12)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 13)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 14)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 15)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 16)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 16 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 17)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 17 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 18)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 18 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 19)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 19 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 20)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 20 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 21)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 21 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 22)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 22 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 23)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 23 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 24)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 24 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 25)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 25 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 26)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 26 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 27)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 27 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 28)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 28 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 29)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 29 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 30)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 30 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
{
|
||||||
|
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.jaxis.which == joystick_index2)
|
||||||
|
{
|
||||||
|
if ((BothRumbleMotor == 1) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 1) & (RightRumbleMotor == 0))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((BothRumbleMotor == 0) & (LeftRumbleMotor == 0) & (RightRumbleMotor == 1))
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.type == SDL_JOYBUTTONUP)
|
||||||
|
{
|
||||||
|
if (e.jaxis.which == joystick_index1)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Rumble || e.jbutton.button == Button2Rumble || e.jbutton.button == Button3Rumble || e.jbutton.button == Button4Rumble || e.jbutton.button == Button5Rumble || e.jbutton.button == Button6Rumble || e.jbutton.button == Button7Rumble || e.jbutton.button == Button8Rumble || e.jbutton.button == Button9Rumble || e.jbutton.button == Button10Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(0, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.jaxis.which == joystick_index2)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Button1Device2Rumble || e.jbutton.button == Button2Device2Rumble || e.jbutton.button == Button3Device2Rumble || e.jbutton.button == Button4Device2Rumble || e.jbutton.button == Button5Device2Rumble || e.jbutton.button == Button6Device2Rumble || e.jbutton.button == Button7Device2Rumble || e.jbutton.button == Button8Device2Rumble || e.jbutton.button == Button9Device2Rumble || e.jbutton.button == Button10Device2Rumble)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRightDevice2(0, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/ButtonRumble64bit.h
Normal file
7
Game Files/ButtonRumble64bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class ButtonRumble64bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
124
Game Files/ChaseHQ2.cpp
Normal file
124
Game Files/ChaseHQ2.cpp
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "ChaseHQ2.h"
|
||||||
|
|
||||||
|
int ttx2chasehq2(int ffRaw) {
|
||||||
|
switch (ffRaw) {
|
||||||
|
// moving right, from weakest to strongest (30 => 16).
|
||||||
|
case 28672:
|
||||||
|
return 30;
|
||||||
|
case 24640:
|
||||||
|
return 29;
|
||||||
|
case 28736:
|
||||||
|
return 28;
|
||||||
|
case 16624:
|
||||||
|
return 27;
|
||||||
|
case 30720:
|
||||||
|
return 26;
|
||||||
|
case 26688:
|
||||||
|
return 25;
|
||||||
|
case 30784:
|
||||||
|
return 24;
|
||||||
|
case 24608:
|
||||||
|
return 23;
|
||||||
|
case 28704:
|
||||||
|
return 22;
|
||||||
|
case 24672:
|
||||||
|
return 21;
|
||||||
|
case 28768:
|
||||||
|
return 20;
|
||||||
|
case 26656:
|
||||||
|
return 19;
|
||||||
|
case 30752:
|
||||||
|
return 18;
|
||||||
|
case 26720:
|
||||||
|
return 17;
|
||||||
|
case 30816:
|
||||||
|
return 16;
|
||||||
|
|
||||||
|
// moving left, from weakest to strongest (15 => 1)
|
||||||
|
case 20480:
|
||||||
|
return 15;
|
||||||
|
case 16448:
|
||||||
|
return 14;
|
||||||
|
case 20544:
|
||||||
|
return 13;
|
||||||
|
case 18432:
|
||||||
|
return 12;
|
||||||
|
case 22528:
|
||||||
|
return 11;
|
||||||
|
case 18496:
|
||||||
|
return 10;
|
||||||
|
case 22592:
|
||||||
|
return 9;
|
||||||
|
case 16416:
|
||||||
|
return 8;
|
||||||
|
case 20512:
|
||||||
|
return 7;
|
||||||
|
case 16480:
|
||||||
|
return 6;
|
||||||
|
case 20576:
|
||||||
|
return 5;
|
||||||
|
case 18464:
|
||||||
|
return 4;
|
||||||
|
case 22560:
|
||||||
|
return 3;
|
||||||
|
case 18528:
|
||||||
|
return 2;
|
||||||
|
case 22624:
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChaseHQ2::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
int ff = 0;
|
||||||
|
{
|
||||||
|
long ffAddress = helpers->ReadInt32(0x130B558, /* isRelativeOffset*/ true);
|
||||||
|
int ffRaw = helpers->ReadInt32(ffAddress + 0x45, /* isRelativeOffset */ false);
|
||||||
|
int lampArray[8] = { (16384) + 1, 16 ,1024 ,512, 128, 8, 256 };//The 1 isn't needed but I wasn't sure how to get the 16384 to see the first digit any other way lol
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
if ((ffRaw & lampArray[i]) == lampArray[i]) {
|
||||||
|
ffRaw -= lampArray[i];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ff = ttx2chasehq2(ffRaw);
|
||||||
|
}
|
||||||
|
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if (ff > 15)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
// assume that 30 is the weakest and 16 is the strongest
|
||||||
|
double percentForce = (31 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); // old logic: 31 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else if (ff > 0)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
// assume that 1 is the strongest and 15 is the weakest
|
||||||
|
double percentForce = (16 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); // old logic: 15 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/ChaseHQ2.h
Normal file
8
Game Files/ChaseHQ2.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class ChaseHQ2 : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
277
Game Files/Daytona3.cpp
Normal file
277
Game Files/Daytona3.cpp
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "Daytona3.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
|
||||||
|
void Daytona3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
int ff = helpers->ReadInt32(0x15AFC46, /* isRelativeOffset */ false);
|
||||||
|
int gamestate = helpers->ReadInt32(0x19B5744, /* isRelativeOffset */ false);
|
||||||
|
UINT8 gear = helpers->ReadByte(0x019B468C, /* isRelativeOffset */ false);
|
||||||
|
UINT8 steering = helpers->ReadByte(0x019B4678, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int ShowButtonNumbersForSetup = GetPrivateProfileInt(TEXT("Settings"), TEXT("ShowButtonNumbersForSetup"), 0, settingsFilename);
|
||||||
|
int ChangeGearsViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("ChangeGearsViaPlugin"), 0, settingsFilename);
|
||||||
|
int EscapeKeyExitViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("EscapeKeyExitViaPlugin"), 0, settingsFilename);
|
||||||
|
int MenuMovementViaPlugin = GetPrivateProfileInt(TEXT("Settings"), TEXT("MenuMovementViaPlugin"), 0, settingsFilename);
|
||||||
|
int Gear1 = GetPrivateProfileInt(TEXT("Settings"), TEXT("Gear1"), 0, settingsFilename);
|
||||||
|
int Gear2 = GetPrivateProfileInt(TEXT("Settings"), TEXT("Gear2"), 0, settingsFilename);
|
||||||
|
int Gear3 = GetPrivateProfileInt(TEXT("Settings"), TEXT("Gear3"), 0, settingsFilename);
|
||||||
|
int Gear4 = GetPrivateProfileInt(TEXT("Settings"), TEXT("Gear4"), 0, settingsFilename);
|
||||||
|
int GearUp = GetPrivateProfileInt(TEXT("Settings"), TEXT("GearUp"), 0, settingsFilename);
|
||||||
|
int GearDown = GetPrivateProfileInt(TEXT("Settings"), TEXT("GearDown"), 0, settingsFilename);
|
||||||
|
int HideCursor = GetPrivateProfileInt(TEXT("Settings"), TEXT("HideCursor"), 0, settingsFilename);
|
||||||
|
|
||||||
|
if (HideCursor == 1)
|
||||||
|
{
|
||||||
|
SetCursorPos(2000, 2000);
|
||||||
|
}
|
||||||
|
|
||||||
|
SDL_Event e;
|
||||||
|
while (SDL_PollEvent(&e) != 0)
|
||||||
|
{
|
||||||
|
/* if (e.type == SDL_KEYDOWN)
|
||||||
|
{
|
||||||
|
if (e.key.keysym.sym == SDLK_ESCAPE)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "test", "", 0);
|
||||||
|
}
|
||||||
|
} */
|
||||||
|
if (ShowButtonNumbersForSetup == 1)
|
||||||
|
{
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == 0)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 0 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 1)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 1 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 2)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 2 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 3)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 3 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 4)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 4 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 5)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 5 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 6)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 6 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 7)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 7 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 8)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 8 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 9)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 9 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 10)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 10 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 11)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 11 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 12)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 12 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 13)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 13 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 14)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 14 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 15)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 15 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 16)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 16 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 17)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 17 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 18)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 18 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 19)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 19 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 20)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 20 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 21)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 21 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 22)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 22 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 23)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 23 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 24)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 24 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 25)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 25 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 26)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 26 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 27)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 27 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 28)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 28 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 29)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 29 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == 30)
|
||||||
|
{
|
||||||
|
MessageBoxA(NULL, "Button 30 Pressed", "", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (e.type == SDL_JOYBUTTONDOWN)
|
||||||
|
{
|
||||||
|
if (ChangeGearsViaPlugin == 1)
|
||||||
|
{
|
||||||
|
if (e.jbutton.button == Gear1)
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, 0x00, false);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == Gear2)
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, 0x02, false);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == Gear3)
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, 0x01, false);
|
||||||
|
}
|
||||||
|
else if (e.jbutton.button == Gear4)
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, 0x03, false);
|
||||||
|
}
|
||||||
|
else if ((e.jbutton.button == GearDown) && (gear > 0x00))
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, --gear, false);
|
||||||
|
}
|
||||||
|
else if ((e.jbutton.button == GearUp) && (gear < 0x03))
|
||||||
|
{
|
||||||
|
helpers->WriteByte(0x019B468C, ++gear, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (GetAsyncKeyState((VK_ESCAPE)) && (EscapeKeyExitViaPlugin == 1))
|
||||||
|
{
|
||||||
|
system("taskkill /f /im Daytona.exe");
|
||||||
|
system("taskkill /f /im InpWrapper.exe");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((steering > 137) & (gamestate == 18) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_RIGHT, 0x25, 0, 0);
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
Sleep(100);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
else if ((steering > 117 & steering < 138) & (gamestate == 18) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
else if ((steering < 118) & (gamestate == 18) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_LEFT, 0x25, 0, 0);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
Sleep(100);
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
if ((steering > 137) & (gamestate == 30) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_RIGHT, 0x25, 0, 0);
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
Sleep(100);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
else if ((steering > 117 & steering < 138) & (gamestate == 30) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
else if ((steering < 118) & (gamestate == 30) && (MenuMovementViaPlugin == 1))
|
||||||
|
{
|
||||||
|
keybd_event(VK_LEFT, 0x25, 0, 0);
|
||||||
|
keybd_event(VK_RIGHT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
Sleep(100);
|
||||||
|
keybd_event(VK_LEFT, 0, KEYEVENTF_KEYUP, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ff > 15)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
// assume that 30 is the weakest and 16 is the strongest
|
||||||
|
double percentForce = (31 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); // old logic: 31 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else if (ff > 0)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
// assume that 1 is the strongest and 15 is the weakest
|
||||||
|
double percentForce = (16 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); // old logic: 15 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/Daytona3.h
Normal file
8
Game Files/Daytona3.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Daytona3 : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
161
Game Files/Demul.cpp
Normal file
161
Game Files/Demul.cpp
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
#include <string>
|
||||||
|
#include <tchar.h>
|
||||||
|
#include "Demul.h"
|
||||||
|
#include "math.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
int nascar(int ffnas) {
|
||||||
|
switch (ffnas) {
|
||||||
|
|
||||||
|
case 0x04:
|
||||||
|
return 32;
|
||||||
|
case 0x84:
|
||||||
|
return 31;
|
||||||
|
case 0x44:
|
||||||
|
return 30;
|
||||||
|
case 0xC4:
|
||||||
|
return 29;
|
||||||
|
case 0x24:
|
||||||
|
return 28;
|
||||||
|
case 0xA4:
|
||||||
|
return 27;
|
||||||
|
case 0x64:
|
||||||
|
return 26;
|
||||||
|
case 0xE4:
|
||||||
|
return 25;
|
||||||
|
case 0x14:
|
||||||
|
return 24;
|
||||||
|
case 0x94:
|
||||||
|
return 23;
|
||||||
|
case 0x54:
|
||||||
|
return 22;
|
||||||
|
case 0xD4:
|
||||||
|
return 21;
|
||||||
|
case 0x34:
|
||||||
|
return 20;
|
||||||
|
case 0xB4:
|
||||||
|
return 19;
|
||||||
|
case 0x74:
|
||||||
|
return 18;
|
||||||
|
case 0xF4:
|
||||||
|
return 17;
|
||||||
|
|
||||||
|
case 0xFC:
|
||||||
|
return 16;
|
||||||
|
case 0x7C:
|
||||||
|
return 15;
|
||||||
|
case 0xBC:
|
||||||
|
return 14;
|
||||||
|
case 0x3C:
|
||||||
|
return 13;
|
||||||
|
case 0xDC:
|
||||||
|
return 12;
|
||||||
|
case 0x5C:
|
||||||
|
return 11;
|
||||||
|
case 0x9C:
|
||||||
|
return 10;
|
||||||
|
case 0x1C:
|
||||||
|
return 9;
|
||||||
|
case 0xEC:
|
||||||
|
return 8;
|
||||||
|
case 0x6C:
|
||||||
|
return 7;
|
||||||
|
case 0xAC:
|
||||||
|
return 6;
|
||||||
|
case 0x2C:
|
||||||
|
return 5;
|
||||||
|
case 0xCC:
|
||||||
|
return 4;
|
||||||
|
case 0x4C:
|
||||||
|
return 3;
|
||||||
|
case 0x8C:
|
||||||
|
return 2;
|
||||||
|
case 0x0C:
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CALLBACK FindWindowBySubstr(HWND hwnd, LPARAM substring)
|
||||||
|
{
|
||||||
|
const DWORD TITLE_SIZE = 1024;
|
||||||
|
TCHAR windowTitle[TITLE_SIZE];
|
||||||
|
|
||||||
|
if (GetWindowText(hwnd, windowTitle, TITLE_SIZE))
|
||||||
|
{
|
||||||
|
//_tprintf(TEXT("%s\n"), windowTitle);
|
||||||
|
// Uncomment to print all windows being enumerated
|
||||||
|
if (_tcsstr(windowTitle, LPCTSTR(substring)) != NULL)
|
||||||
|
{
|
||||||
|
// We found the window! Stop enumerating.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true; // Need to continue enumerating windows
|
||||||
|
}
|
||||||
|
|
||||||
|
void Demul::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||||
|
|
||||||
|
const TCHAR substring[] = TEXT("NASCAR");
|
||||||
|
EnumWindows(FindWindowBySubstr, (LPARAM)substring);
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
|
||||||
|
{
|
||||||
|
int ffnascar = 0;
|
||||||
|
{
|
||||||
|
if (!EnumWindows(FindWindowBySubstr, (LPARAM)substring))
|
||||||
|
{
|
||||||
|
UINT8 ffnas = helpers->ReadByte(0x30060C, /* isRelativeOffset */ true); //Nascar Arcade
|
||||||
|
std::string ffs = std::to_string(ffnas);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
helpers->log("got value: ");
|
||||||
|
ffnascar = nascar(ffnas);
|
||||||
|
|
||||||
|
if (FFBMode == 0)
|
||||||
|
{
|
||||||
|
if ((ffnascar > 16) & (ffnascar < 33))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ffnascar - 16) / 16.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ffnascar > 0) & (ffnascar < 17))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (17 - ffnascar) / 16.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((ffnascar > 16) & (ffnascar < 33))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ffnascar - 16) / 16.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ffnascar > 0) & (ffnascar < 17))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (17 - ffnascar) / 16.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
7
Game Files/Demul.h
Normal file
7
Game Files/Demul.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Demul : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
6
Game Files/FNF.cpp
Normal file
6
Game Files/FNF.cpp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "FNF.h"
|
||||||
|
|
||||||
|
|
||||||
|
void FNF::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
}
|
8
Game Files/FNF.h
Normal file
8
Game Files/FNF.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class FNF : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
42
Game Files/FordRacing.cpp
Normal file
42
Game Files/FordRacing.cpp
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "FordRacing.h"
|
||||||
|
|
||||||
|
void FordRacing::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
helpers->log("in FR Ffbloop");
|
||||||
|
const int ff = GetTeknoParrotFFB();
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if (ff < -65505 && ff > -65515)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
// -65507 => 9
|
||||||
|
// -65508 => 8
|
||||||
|
// -65515 => 1
|
||||||
|
// weirdly, FR has 9 levels, not 15, utilizing only -65506 (weakest) to -65514 (strongest)
|
||||||
|
double percentForce = (-65505 - ff) / 9.0;
|
||||||
|
double percentLength = 50;
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else if (ff > 0 && ff < 16)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
// weirdly, FR has 9 levels, not 15, utilizing 15 (weakest) through 7 (strongest)
|
||||||
|
double percentForce = (16 - ff) / 9.0;
|
||||||
|
double percentLength = 50;
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/FordRacing.h
Normal file
8
Game Files/FordRacing.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/TeknoParrotGame.h"
|
||||||
|
|
||||||
|
class FordRacing : public TeknoParrotGame {
|
||||||
|
public:
|
||||||
|
FordRacing() : TeknoParrotGame() { }
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
68
Game Files/GTIClub3.cpp
Normal file
68
Game Files/GTIClub3.cpp
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "GTIClub3.h"
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
|
void GTIClub3::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
UINT8 ff = helpers->ReadByte(0x00918CBC, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(0x00918CBD, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff2 = helpers->ReadByte(0x00918CBE, /* isRelativeOffset */ false);
|
||||||
|
UINT8 menu = helpers->ReadByte(0x518E8E, /* isRelativeOffset */ true);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff2);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if (FFBMode == 0)
|
||||||
|
{
|
||||||
|
if ((ff1 > 0x00) & (ff1 < 0x40) & (menu == 0))
|
||||||
|
{
|
||||||
|
double percentForce = (ff1) / 63.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(120, 120, percentForce);
|
||||||
|
}
|
||||||
|
if ((ff > 0x80) & (ff < 0x101) & (menu == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (257 - ff) / 128.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x80) & (menu == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 127.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((ff1 > 0x00) & (ff1 < 0x40) & (menu == 0))
|
||||||
|
{
|
||||||
|
double percentForce = (ff1) / 63.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Sine(120, 120, pow(percentForce, 0.5));
|
||||||
|
}
|
||||||
|
if ((ff > 0x80) & (ff < 0x101) & (menu == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (257 - ff) / 128.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x80) & (menu == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 127.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/GTIClub3.h
Normal file
7
Game Files/GTIClub3.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class GTIClub3 : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
47
Game Files/InitialD4.cpp
Normal file
47
Game Files/InitialD4.cpp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD4.h"
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
|
void InitialD4::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers){
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
UINT8 ff = helpers->ReadByte(0x089AE89A, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(0x089AE899, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT,(pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/InitialD4.h
Normal file
7
Game Files/InitialD4.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class InitialD4 : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
46
Game Files/InitialD4Japan.cpp
Normal file
46
Game Files/InitialD4Japan.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD4Japan.h"
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
|
void InitialD4Japan::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
UINT8 ff = helpers->ReadByte(0x0898985A, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(0x08989859, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/InitialD4Japan.h
Normal file
7
Game Files/InitialD4Japan.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class InitialD4Japan : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
46
Game Files/InitialD5.cpp
Normal file
46
Game Files/InitialD5.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD5.h"
|
||||||
|
#include "math.h"
|
||||||
|
|
||||||
|
void InitialD5::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers) {
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
UINT8 ff = helpers->ReadByte(0x08CB6122, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(0x08CB6121, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x37) & (ff < 0x80) & (ff1 == 0) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (128 - ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ff > 0x00) & (ff < 0x49) & (ff1 == 1) & (FFBMode == 1))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff) / 73.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
7
Game Files/InitialD5.h
Normal file
7
Game Files/InitialD5.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class InitialD5 : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
93
Game Files/InitialD6.cpp
Normal file
93
Game Files/InitialD6.cpp
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD6.h"
|
||||||
|
|
||||||
|
void InitialD6::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers)
|
||||||
|
{
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int SineDivision = GetPrivateProfileInt(TEXT("Settings"), TEXT("SineDivision"), 0, settingsFilename);
|
||||||
|
helpers->log("in ID6 Ffbloop");
|
||||||
|
const int ff = GetTeknoParrotFFB();
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x4005B) & (ff < 0x40080))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (262272 - ff) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x40100) & (ff < 0x40125))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff - 262400) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 390001) && (ff <= 399999))
|
||||||
|
{
|
||||||
|
helpers->log("sine1");
|
||||||
|
double percentForce = (ff - 390000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(120, 100, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 380001) && (ff <= 389999))
|
||||||
|
{
|
||||||
|
helpers->log("sine2");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 380000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(130, 120, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 370001) && (ff <= 379999))
|
||||||
|
{
|
||||||
|
helpers->log("sine3");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 370000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(140, 140, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 360001) && (ff <= 369999))
|
||||||
|
{
|
||||||
|
helpers->log("sine4");
|
||||||
|
double percentForce = (ff - 360000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(150, 150, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 350001) && (ff <= 359999))
|
||||||
|
{
|
||||||
|
helpers->log("sine5");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 350000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(160, 160, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 340001) && (ff <= 349999))
|
||||||
|
{
|
||||||
|
helpers->log("sine6");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 340000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(170, 170, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 330001) && (ff <= 339999))
|
||||||
|
{
|
||||||
|
helpers->log("sine7");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 330000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 180, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 327681) && (ff <= 329999))
|
||||||
|
{
|
||||||
|
helpers->log("sine8");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 327680) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(190, 190, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/InitialD6.h
Normal file
8
Game Files/InitialD6.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/TeknoParrotGame.h"
|
||||||
|
|
||||||
|
class InitialD6 : public TeknoParrotGame {
|
||||||
|
public:
|
||||||
|
InitialD6() : TeknoParrotGame() { }
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
93
Game Files/InitialD7.cpp
Normal file
93
Game Files/InitialD7.cpp
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD7.h"
|
||||||
|
|
||||||
|
void InitialD7::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers)
|
||||||
|
{
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int SineDivision = GetPrivateProfileInt(TEXT("Settings"), TEXT("SineDivision"), 0, settingsFilename);
|
||||||
|
helpers->log("in ID6 Ffbloop");
|
||||||
|
const int ff = GetTeknoParrotFFB();
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x4005B) & (ff < 0x40080))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (262272 - ff) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x40100) & (ff < 0x40125))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff - 262400) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 390001) && (ff <= 399999))
|
||||||
|
{
|
||||||
|
helpers->log("sine1");
|
||||||
|
double percentForce = (ff - 390000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(120, 100, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 380001) && (ff <= 389999))
|
||||||
|
{
|
||||||
|
helpers->log("sine2");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 380000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(130, 120, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 370001) && (ff <= 379999))
|
||||||
|
{
|
||||||
|
helpers->log("sine3");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 370000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(140, 140, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 360001) && (ff <= 369999))
|
||||||
|
{
|
||||||
|
helpers->log("sine4");
|
||||||
|
double percentForce = (ff - 360000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(150, 150, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 350001) && (ff <= 359999))
|
||||||
|
{
|
||||||
|
helpers->log("sine5");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 350000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(160, 160, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 340001) && (ff <= 349999))
|
||||||
|
{
|
||||||
|
helpers->log("sine6");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 340000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(170, 170, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 330001) && (ff <= 339999))
|
||||||
|
{
|
||||||
|
helpers->log("sine7");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 330000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 180, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 327681) && (ff <= 329999))
|
||||||
|
{
|
||||||
|
helpers->log("sine8");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 327680) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(190, 190, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/InitialD7.h
Normal file
8
Game Files/InitialD7.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/TeknoParrotGame.h"
|
||||||
|
|
||||||
|
class InitialD7 : public TeknoParrotGame {
|
||||||
|
public:
|
||||||
|
InitialD7() : TeknoParrotGame() { }
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
93
Game Files/InitialD8.cpp
Normal file
93
Game Files/InitialD8.cpp
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "InitialD8.h"
|
||||||
|
|
||||||
|
void InitialD8::FFBLoop(EffectConstants * constants, Helpers * helpers, EffectTriggers * triggers)
|
||||||
|
{
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int SineDivision = GetPrivateProfileInt(TEXT("Settings"), TEXT("SineDivision"), 0, settingsFilename);
|
||||||
|
helpers->log("in ID6 Ffbloop");
|
||||||
|
const int ff = GetTeknoParrotFFB();
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if ((ff > 0x4005B) & (ff < 0x40080))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (262272 - ff) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x40100) & (ff < 0x40125))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (ff - 262400) / 36.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 390001) && (ff <= 399999))
|
||||||
|
{
|
||||||
|
helpers->log("sine1");
|
||||||
|
double percentForce = (ff - 390000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(120, 100, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 380001) && (ff <= 389999))
|
||||||
|
{
|
||||||
|
helpers->log("sine2");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 380000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(130, 120, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 370001) && (ff <= 379999))
|
||||||
|
{
|
||||||
|
helpers->log("sine3");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 370000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(140, 140, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 360001) && (ff <= 369999))
|
||||||
|
{
|
||||||
|
helpers->log("sine4");
|
||||||
|
double percentForce = (ff - 360000) / ((SineDivision) / 1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(150, 150, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 350001) && (ff <= 359999))
|
||||||
|
{
|
||||||
|
helpers->log("sine5");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 350000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(160, 160, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 340001) && (ff <= 349999))
|
||||||
|
{
|
||||||
|
helpers->log("sine6");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 340000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(170, 170, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 330001) && (ff <= 339999))
|
||||||
|
{
|
||||||
|
helpers->log("sine7");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 330000) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 180, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff >= 327681) && (ff <= 329999))
|
||||||
|
{
|
||||||
|
helpers->log("sine8");
|
||||||
|
double percentLength = 100;
|
||||||
|
double percentForce = (ff - 327680) / ((SineDivision) / 1.0);
|
||||||
|
triggers->Rumble(percentForce, percentLength);
|
||||||
|
triggers->Sine(190, 190, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/InitialD8.h
Normal file
8
Game Files/InitialD8.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/TeknoParrotGame.h"
|
||||||
|
|
||||||
|
class InitialD8 : public TeknoParrotGame {
|
||||||
|
public:
|
||||||
|
InitialD8() : TeknoParrotGame() { }
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
258
Game Files/LGI.cpp
Normal file
258
Game Files/LGI.cpp
Normal file
@ -0,0 +1,258 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "LGI.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
extern int joystick_index1;
|
||||||
|
extern int joystick_index2;
|
||||||
|
extern SDL_Joystick* GameController2;
|
||||||
|
extern SDL_Haptic* ControllerHaptic2;
|
||||||
|
extern SDL_Haptic* haptic2;
|
||||||
|
|
||||||
|
void LGI::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
int ff = helpers->ReadIntPtr(0x0063BF5C, /* isRelativeOffset */ true);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(ff + 0x44, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health1p1 = helpers->ReadIntPtr(0x00820024, /* isRelativeOffset*/ true);
|
||||||
|
INT_PTR health1p2 = helpers->ReadIntPtr(health1p1 + 0x4, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health1p3 = helpers->ReadIntPtr(health1p2 + 0x58, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health2p3 = helpers->ReadIntPtr(health1p2 + 0x5C, /* isRelativeOffset */ false);
|
||||||
|
float health1p = helpers->ReadFloat32(health1p3 + 0x14, /* isRelativeOffset */ false); //1p health
|
||||||
|
float health2p = helpers->ReadFloat32(health2p3 + 0x14, /* isRelativeOffset */ false); //2p health
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff1);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
float static oldFloat1 = 0.0;
|
||||||
|
float static oldFloat2 = 0.0;
|
||||||
|
float newFloat1 = health1p;
|
||||||
|
float newFloat2 = health2p;
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int HowtoRumbleKnockEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleKnockEffect"), 0, settingsFilename);
|
||||||
|
int HowtoRumbleMotorEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleMotorEffect"), 0, settingsFilename);
|
||||||
|
int HowtoRumbleHealthEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleHealthEffect"), 0, settingsFilename);
|
||||||
|
int Knock1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Knock1pStrength"), 0, settingsFilename);
|
||||||
|
int Motor1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Motor1pStrength"), 0, settingsFilename);
|
||||||
|
int Health1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Health1pStrength"), 0, settingsFilename);
|
||||||
|
int Knock2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Knock2pStrength"), 0, settingsFilename);
|
||||||
|
int Motor2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Motor2pStrength"), 0, settingsFilename);
|
||||||
|
int Health2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Health2pStrength"), 0, settingsFilename);
|
||||||
|
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
wchar_t * deviceGUIDString2 = new wchar_t[256];
|
||||||
|
int Device2GUID = GetPrivateProfileString(TEXT("Settings"), TEXT("Device2GUID"), NULL, deviceGUIDString2, 256, settingsFilename);
|
||||||
|
char joystick_guid[256];
|
||||||
|
sprintf(joystick_guid, "%S", deviceGUIDString2);
|
||||||
|
SDL_JoystickGUID guid, dev_guid;
|
||||||
|
int numJoysticks = SDL_NumJoysticks();
|
||||||
|
std::string njs = std::to_string(numJoysticks);
|
||||||
|
((char)njs.c_str());
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
extern int joystick1Index;
|
||||||
|
if (i == joystick1Index)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SDL_Joystick* js2 = SDL_JoystickOpen(i);
|
||||||
|
joystick_index2 = SDL_JoystickInstanceID(js2);
|
||||||
|
SDL_JoystickGUID guid = SDL_JoystickGetGUID(js2);
|
||||||
|
char guid_str[1024];
|
||||||
|
SDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str));
|
||||||
|
const char* name = SDL_JoystickName(js2);
|
||||||
|
char text[256];
|
||||||
|
sprintf(text, "Joystick: %d / Name: %s / GUID: %s\n", i, name, guid_str);
|
||||||
|
guid = SDL_JoystickGetGUIDFromString(joystick_guid);
|
||||||
|
dev_guid = SDL_JoystickGetGUID(js2);
|
||||||
|
if (!memcmp(&guid, &dev_guid, sizeof(SDL_JoystickGUID)))
|
||||||
|
{
|
||||||
|
GameController2 = SDL_JoystickOpen(i);
|
||||||
|
ControllerHaptic2 = SDL_HapticOpenFromJoystick(GameController2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SDL_JoystickClose(js2);
|
||||||
|
}
|
||||||
|
haptic2 = ControllerHaptic2;
|
||||||
|
if ((SDL_HapticRumbleSupported(haptic2) == SDL_TRUE))
|
||||||
|
{
|
||||||
|
SDL_HapticRumbleInit;
|
||||||
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((oldFloat1 != newFloat1) && (health1p != 0x1))
|
||||||
|
{
|
||||||
|
if (HowtoRumbleHealthEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((oldFloat2 != newFloat2) && (health2p != 0x1))
|
||||||
|
{
|
||||||
|
if (HowtoRumbleHealthEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ff1 == 0x20)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x40)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x4)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x8)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x24)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x48)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oldFloat1 = newFloat1;
|
||||||
|
oldFloat2 = newFloat2;
|
||||||
|
}
|
7
Game Files/LGI.h
Normal file
7
Game Files/LGI.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class LGI : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
343
Game Files/LGI3D.cpp
Normal file
343
Game Files/LGI3D.cpp
Normal file
@ -0,0 +1,343 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "LGI3D.h"
|
||||||
|
#include "SDL.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
extern int joystick_index1;
|
||||||
|
extern int joystick_index2;
|
||||||
|
extern SDL_Haptic* haptic2;
|
||||||
|
extern SDL_Joystick* GameController2;
|
||||||
|
extern SDL_Haptic* ControllerHaptic2;
|
||||||
|
|
||||||
|
void LGI3D::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
int ff = helpers->ReadIntPtr(0x0065DA20, /* isRelativeOffset */ true);
|
||||||
|
UINT8 ff1 = helpers->ReadByte(ff + 0x44, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health1p1 = helpers->ReadIntPtr(0x008429F4, /* isRelativeOffset*/ true);
|
||||||
|
INT_PTR health1p2 = helpers->ReadIntPtr(health1p1 + 0x4, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health1p3 = helpers->ReadIntPtr(health1p2 + 0x74, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR health2p3 = helpers->ReadIntPtr(health1p2 + 0x78, /* isRelativeOffset */ false);
|
||||||
|
float health1p = helpers->ReadFloat32(health1p3 + 0x14, /* isRelativeOffset */ false); //1p health
|
||||||
|
float health2p = helpers->ReadFloat32(health2p3 + 0x14, /* isRelativeOffset */ false); //2p health
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff1);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
float static oldFloat1 = 0.0;
|
||||||
|
float static oldFloat2 = 0.0;
|
||||||
|
float newFloat1 = health1p;
|
||||||
|
float newFloat2 = health2p;
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int HowtoRumbleKnockEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleKnockEffect"), 0, settingsFilename);
|
||||||
|
int HowtoRumbleMotorEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleMotorEffect"), 0, settingsFilename);
|
||||||
|
int HowtoRumbleHealthEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumbleHealthEffect"), 0, settingsFilename);
|
||||||
|
int Knock1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Knock1pStrength"), 0, settingsFilename);
|
||||||
|
int Motor1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Motor1pStrength"), 0, settingsFilename);
|
||||||
|
int Health1pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Health1pStrength"), 0, settingsFilename);
|
||||||
|
int Knock2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Knock2pStrength"), 0, settingsFilename);
|
||||||
|
int Motor2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Motor2pStrength"), 0, settingsFilename);
|
||||||
|
int Health2pStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Health2pStrength"), 0, settingsFilename);
|
||||||
|
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
wchar_t * deviceGUIDString2 = new wchar_t[256];
|
||||||
|
int Device2GUID = GetPrivateProfileString(TEXT("Settings"), TEXT("Device2GUID"), NULL, deviceGUIDString2, 256, settingsFilename);
|
||||||
|
char joystick_guid[256];
|
||||||
|
sprintf(joystick_guid, "%S", deviceGUIDString2);
|
||||||
|
SDL_JoystickGUID guid, dev_guid;
|
||||||
|
int numJoysticks = SDL_NumJoysticks();
|
||||||
|
std::string njs = std::to_string(numJoysticks);
|
||||||
|
((char)njs.c_str());
|
||||||
|
for (int i = 0; i < SDL_NumJoysticks(); i++)
|
||||||
|
{
|
||||||
|
extern int joystick1Index;
|
||||||
|
if (i == joystick1Index)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
SDL_Joystick* js2 = SDL_JoystickOpen(i);
|
||||||
|
joystick_index2 = SDL_JoystickInstanceID(js2);
|
||||||
|
SDL_JoystickGUID guid = SDL_JoystickGetGUID(js2);
|
||||||
|
char guid_str[1024];
|
||||||
|
SDL_JoystickGetGUIDString(guid, guid_str, sizeof(guid_str));
|
||||||
|
const char* name = SDL_JoystickName(js2);
|
||||||
|
char text[256];
|
||||||
|
sprintf(text, "Joystick: %d / Name: %s / GUID: %s\n", i, name, guid_str);
|
||||||
|
guid = SDL_JoystickGetGUIDFromString(joystick_guid);
|
||||||
|
dev_guid = SDL_JoystickGetGUID(js2);
|
||||||
|
if (!memcmp(&guid, &dev_guid, sizeof(SDL_JoystickGUID)))
|
||||||
|
{
|
||||||
|
GameController2 = SDL_JoystickOpen(i);
|
||||||
|
ControllerHaptic2 = SDL_HapticOpenFromJoystick(GameController2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
SDL_JoystickClose(js2);
|
||||||
|
}
|
||||||
|
haptic2 = ControllerHaptic2;
|
||||||
|
if ((SDL_HapticRumbleSupported(haptic2) == SDL_TRUE))
|
||||||
|
{
|
||||||
|
SDL_HapticRumbleInit;
|
||||||
|
SDL_HapticRumbleInit(ControllerHaptic2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((oldFloat1 != newFloat1) && (health1p != 0x1))
|
||||||
|
{
|
||||||
|
if (HowtoRumbleHealthEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health1pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((oldFloat2 != newFloat2) && (health2p != 0x1))
|
||||||
|
{
|
||||||
|
if (HowtoRumbleHealthEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleHealthEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Health2pStrength) / 100.0);
|
||||||
|
double percentLength = (400);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ff1 == 0x20)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x40)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x22)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x42)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x4)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x8)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x6)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0xA)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x24)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleKnockEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleKnockEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Knock1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (ff1 == 0x4A)
|
||||||
|
{
|
||||||
|
if (HowtoRumbleMotorEffect == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->LeftRightDevice2(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumbleMotorEffect == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((Motor1pStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->LeftRightDevice2(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oldFloat1 = newFloat1;
|
||||||
|
oldFloat2 = newFloat2;
|
||||||
|
}
|
7
Game Files/LGI3D.h
Normal file
7
Game Files/LGI3D.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class LGI3D : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
6062
Game Files/M2Emulator.cpp
Normal file
6062
Game Files/M2Emulator.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/M2Emulator.h
Normal file
7
Game Files/M2Emulator.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class M2Emulator : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
197
Game Files/Machstorm.cpp
Normal file
197
Game Files/Machstorm.cpp
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "Machstorm.h"
|
||||||
|
typedef unsigned char U8;
|
||||||
|
typedef unsigned int U32;
|
||||||
|
typedef uint16_t U16;
|
||||||
|
void Machstorm::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int DomeFix = GetPrivateProfileInt(TEXT("Settings"), TEXT("DomeFix"), 0, settingsFilename);
|
||||||
|
int Power1RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power1RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power2RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power2RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power3RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power3RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power4RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power4RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power5RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power5RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power6RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power6RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power7RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power7RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power8RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power8RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power9RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power9RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power10RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power10RumbleStrength"), 0, settingsFilename);
|
||||||
|
int Power1RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power1RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power2RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power2RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power3RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power3RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power4RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power4RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power5RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power5RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power6RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power6RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power7RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power7RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power8RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power8RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power9RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power9RumbleLength"), 0, settingsFilename);
|
||||||
|
int Power10RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("Power10RumbleLength"), 0, settingsFilename);
|
||||||
|
int vibration = helpers->ReadInt32(0x6390E9, /* relative */ true);
|
||||||
|
int power = helpers->ReadInt32(0x639109, /* relative */ true);
|
||||||
|
|
||||||
|
/*if (DomeFix == 1)
|
||||||
|
{
|
||||||
|
U16 *buffer = new U16[1920 * 1080 * 2];
|
||||||
|
|
||||||
|
for (int y = 0; y < 1080; y++)
|
||||||
|
{
|
||||||
|
for (int x = 0; x < 1920; x++)
|
||||||
|
{
|
||||||
|
float d = 0.5f;
|
||||||
|
float xf = x / 1920.0f;
|
||||||
|
float yf = y / 1080.0f;
|
||||||
|
xf = 2.0f * xf - 1.0f;
|
||||||
|
yf = 2.0f * yf - 1.0f;
|
||||||
|
if (0.0f > xf)
|
||||||
|
{
|
||||||
|
float k = 0.95f * -xf / (-xf + d);
|
||||||
|
xf = -k;
|
||||||
|
yf = yf * (1.0f - k);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float k = 0.95f * xf / (xf + d);
|
||||||
|
xf = k;
|
||||||
|
yf = yf * (1.0f - k);
|
||||||
|
}
|
||||||
|
xf = 0.5f * xf + 0.5f;
|
||||||
|
yf = -0.5f * yf - 0.5f;
|
||||||
|
buffer[(y * 1920 + x) * 2] = 65535 * xf;
|
||||||
|
buffer[(y * 1920 + x) * 2 + 1] = 65535 * yf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
helpers->WriteByte<U8>(0x003D2FEE, 0x45, true);
|
||||||
|
helpers->WriteByte<U8>(0x003D3637, 0xB8, true);
|
||||||
|
helpers->WriteIntPtr<U32>(0x003D3638, (U16)buffer, true);
|
||||||
|
helpers->WriteIntPtr<U32>(0x003D363C, 0x0C244489, true);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (vibration == 16842753)
|
||||||
|
{
|
||||||
|
if (power == 61542)
|
||||||
|
{
|
||||||
|
double percentLength = (Power1RumbleLength);
|
||||||
|
double percentForce = ((Power1RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61543)
|
||||||
|
{
|
||||||
|
double percentLength = (Power2RumbleLength);
|
||||||
|
double percentForce = ((Power2RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61544)
|
||||||
|
{
|
||||||
|
double percentLength = (Power3RumbleLength);
|
||||||
|
double percentForce = ((Power3RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61545)
|
||||||
|
{
|
||||||
|
double percentLength = (Power4RumbleLength);
|
||||||
|
double percentForce = ((Power4RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61546)
|
||||||
|
{
|
||||||
|
double percentLength = (Power5RumbleLength);
|
||||||
|
double percentForce = ((Power5RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61547)
|
||||||
|
{
|
||||||
|
double percentLength = (Power6RumbleLength);
|
||||||
|
double percentForce = ((Power6RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61548)
|
||||||
|
{
|
||||||
|
double percentLength = (Power7RumbleLength);
|
||||||
|
double percentForce = ((Power7RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61549)
|
||||||
|
{
|
||||||
|
double percentLength = (Power8RumbleLength);
|
||||||
|
double percentForce = ((Power8RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61550)
|
||||||
|
{
|
||||||
|
double percentLength = (Power9RumbleLength);
|
||||||
|
double percentForce = ((Power9RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 61551)
|
||||||
|
{
|
||||||
|
double percentLength = (Power10RumbleLength);
|
||||||
|
double percentForce = ((Power10RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (vibration == 1)
|
||||||
|
{
|
||||||
|
if (power == 16773366)
|
||||||
|
{
|
||||||
|
double percentLength = (Power1RumbleLength);
|
||||||
|
double percentForce = ((Power1RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773367)
|
||||||
|
{
|
||||||
|
double percentLength = (Power2RumbleLength);
|
||||||
|
double percentForce = ((Power2RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773368)
|
||||||
|
{
|
||||||
|
double percentLength = (Power3RumbleLength);
|
||||||
|
double percentForce = ((Power3RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773369)
|
||||||
|
{
|
||||||
|
double percentLength = (Power4RumbleLength);
|
||||||
|
double percentForce = ((Power4RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773370)
|
||||||
|
{
|
||||||
|
double percentLength = (Power5RumbleLength);
|
||||||
|
double percentForce = ((Power5RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773371)
|
||||||
|
{
|
||||||
|
double percentLength = (Power6RumbleLength);
|
||||||
|
double percentForce = ((Power6RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773372)
|
||||||
|
{
|
||||||
|
double percentLength = (Power7RumbleLength);
|
||||||
|
double percentForce = ((Power7RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773373)
|
||||||
|
{
|
||||||
|
double percentLength = (Power8RumbleLength);
|
||||||
|
double percentForce = ((Power8RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773374)
|
||||||
|
{
|
||||||
|
double percentLength = (Power9RumbleLength);
|
||||||
|
double percentForce = ((Power9RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (power == 16773375)
|
||||||
|
{
|
||||||
|
double percentLength = (Power10RumbleLength);
|
||||||
|
double percentForce = ((Power10RumbleStrength) / 100.0);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/Machstorm.h
Normal file
8
Game Files/Machstorm.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Machstorm : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
3163
Game Files/Mame019932bit.cpp
Normal file
3163
Game Files/Mame019932bit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/Mame019932bit.h
Normal file
7
Game Files/Mame019932bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Mame019932bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
6559
Game Files/Mame019964bit.cpp
Normal file
6559
Game Files/Mame019964bit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/Mame019964bit.h
Normal file
7
Game Files/Mame019964bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Mame019964bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
3116
Game Files/Mame020632bit.cpp
Normal file
3116
Game Files/Mame020632bit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/Mame020632bit.h
Normal file
7
Game Files/Mame020632bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Mame020632bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
5903
Game Files/Mame020664bit.cpp
Normal file
5903
Game Files/Mame020664bit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/Mame020664bit.h
Normal file
7
Game Files/Mame020664bit.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class Mame020664bit : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
105
Game Files/MarioKartGPDX.cpp
Normal file
105
Game Files/MarioKartGPDX.cpp
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "MarioKartGPDX.h"
|
||||||
|
|
||||||
|
void MarioKartGPDX100::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
helpers->log("in MKDX Ffbloop");
|
||||||
|
|
||||||
|
int ff1 = helpers->ReadInt32(0x564C5F, /* isRelativeOffset */ true); //shake
|
||||||
|
int ff2 = helpers->ReadInt32(0x559B68,/* isRelativeOffset */ true);
|
||||||
|
int ff3 = helpers->ReadInt32(ff2 + 0x5F8, /* isRelativeOffset */ false); // terrain data
|
||||||
|
int ff4 = helpers->ReadInt32(0x563860, /* isRelativeOffset */ true); //0-255 accl
|
||||||
|
int ff5 = helpers->ReadInt32(ff2 + 0x628, /* isRelativeOffset */ false); //kart flying or on ground
|
||||||
|
int ff6 = helpers->ReadInt32(0x5532C4,/* isRelativeOffset */ true);
|
||||||
|
int ff7 = helpers->ReadInt32(ff6 + 0x1F0, /* isRelativeOffset */ false);
|
||||||
|
int ff8 = helpers->ReadInt32(ff7 + 0x18, /* isRelativeOffset */ false);
|
||||||
|
int ff9 = helpers->ReadInt32(ff8 + 0x7C, /* isRelativeOffset */ false);
|
||||||
|
int ff10 = helpers->ReadInt32(ff9 + 0x164, /* isRelativeOffset */ false); // 1 during race only
|
||||||
|
int ff11 = helpers->ReadInt32(ff2 + 0x520, /* isRelativeOffset */ false); //1065353216 when kart moves
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff1);
|
||||||
|
helpers->log((char *)ffs.c_str()); helpers->log("got value: ");
|
||||||
|
|
||||||
|
|
||||||
|
// Large Shake when hitting walls, other karts or getting hit by items
|
||||||
|
if ((4194308 == ff1) & (ff10 == 1))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 1.0;
|
||||||
|
double percentForce1 = 3.5;
|
||||||
|
double percentLength = (500);
|
||||||
|
triggers->LeftRight(percentForce1, percentForce1, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
|
||||||
|
// small friction when driving on dirt while moving
|
||||||
|
else if ((3 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
// Small constant when hitting bumps
|
||||||
|
else if ((10 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = (50);
|
||||||
|
double percentForce1 = 3.0;
|
||||||
|
triggers->LeftRight(percentForce1, percentForce1, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
// Wheel rumbles while driving on grass
|
||||||
|
else if ((4 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 0.2;
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
//wheel hard to turn while driving through water
|
||||||
|
else if ((7 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
{
|
||||||
|
double percentForce = (0.65);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
//Wheel rumbles lightly when driving over tiles
|
||||||
|
else if ((12 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 0.1;
|
||||||
|
double percentForce1 = 0.2;
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(percentForce1, 0, percentLength);
|
||||||
|
triggers->Sine(70, 70, percentForce);
|
||||||
|
}
|
||||||
|
//Wheel rumbles lightly when driving over sand
|
||||||
|
else if ((14 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 0.1;
|
||||||
|
double percentForce1 = 0.2;
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce1, 0, percentLength);
|
||||||
|
triggers->Sine(70, 70, percentForce);
|
||||||
|
}
|
||||||
|
//Wheel rumbles lightly when driving over rough part of track
|
||||||
|
else if ((11 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 0.1;
|
||||||
|
double percentForce1 = 0.2;
|
||||||
|
double percentLength = (250);
|
||||||
|
triggers->LeftRight(0, percentForce1, percentLength);
|
||||||
|
triggers->Sine(40, 50, percentForce);
|
||||||
|
}
|
||||||
|
//Wheel rumbles moderately when driving over wooden bridges
|
||||||
|
else if ((8 == ff3) & (ff10 == 1) & (ff5 == 1) & (ff11 == 1065353216))
|
||||||
|
|
||||||
|
{
|
||||||
|
double percentForce = 0.4;
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 150, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/MarioKartGPDX.h
Normal file
8
Game Files/MarioKartGPDX.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class MarioKartGPDX100 : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
230
Game Files/MarioKartGPDX1.10.cpp
Normal file
230
Game Files/MarioKartGPDX1.10.cpp
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "MarioKartGPDX1.10.h"
|
||||||
|
|
||||||
|
void MarioKartGPDX110::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int ConstantEffectForSteering = GetPrivateProfileInt(TEXT("Settings"), TEXT("ConstantEffectForSteering"), 0, settingsFilename);
|
||||||
|
int ConstantEffectForSteeringStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("ConstantEffectForSteeringStrength"), 0, settingsFilename);
|
||||||
|
int WeaponRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("WeaponRumble"), 0, settingsFilename);
|
||||||
|
int WeaponRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("WeaponRumbleStrength"), 0, settingsFilename);
|
||||||
|
int CoinRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("CoinRumble"), 0, settingsFilename);
|
||||||
|
int CoinRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("CoinRumbleStrength"), 0, settingsFilename);
|
||||||
|
int DriftRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("DriftRumble"), 0, settingsFilename);
|
||||||
|
int DriftRumbleControllerStrengthMultiplier = GetPrivateProfileInt(TEXT("Settings"), TEXT("DriftRumbleControllerStrengthMultiplier"), 0, settingsFilename);
|
||||||
|
int HitGroundRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("HitGroundRumble"), 0, settingsFilename);
|
||||||
|
int HitGroundRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("HitGroundRumbleStrength"), 0, settingsFilename);
|
||||||
|
int BoostRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("BoostRumble"), 0, settingsFilename);
|
||||||
|
int BoostRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("BoostRumbleStrength"), 0, settingsFilename);
|
||||||
|
int MainShakeRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("MainShakeRumble"), 0, settingsFilename);
|
||||||
|
int MainShakeRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("MainShakeRumbleStrength"), 0, settingsFilename);
|
||||||
|
int DirtRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("DirtRumble"), 0, settingsFilename);
|
||||||
|
int DirtRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("DirtRumbleStrength"), 0, settingsFilename);
|
||||||
|
int GrassRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("GrassRumble"), 0, settingsFilename);
|
||||||
|
int GrassRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("GrassRumbleStrength"), 0, settingsFilename);
|
||||||
|
int SandRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("SandRumble"), 0, settingsFilename);
|
||||||
|
int SandRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("SandRumbleStrength"), 0, settingsFilename);
|
||||||
|
int WaterRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumble"), 0, settingsFilename);
|
||||||
|
int WaterRumbleWheelStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumbleWheelStrength"), 0, settingsFilename);
|
||||||
|
int WaterRumbleControllerStrengthMultiplier = GetPrivateProfileInt(TEXT("Settings"), TEXT("WaterRumbleControllerStrengthMultiplier"), 0, settingsFilename);
|
||||||
|
int TileRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("TileRumble"), 0, settingsFilename);
|
||||||
|
int TileRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("TileRumbleStrength"), 0, settingsFilename);
|
||||||
|
int CarpetRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("CarpetRumble"), 0, settingsFilename);
|
||||||
|
int CarpetRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("CarpetRumbleStrength"), 0, settingsFilename);
|
||||||
|
int SpeedBumpRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("SmallBumpRumble"), 0, settingsFilename);
|
||||||
|
int SpeedBumpRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("SmallBumpRumbleStrength"), 0, settingsFilename);
|
||||||
|
int RoughTrackRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("RoughTrackRumble"), 0, settingsFilename);
|
||||||
|
int RoughTrackRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RoughTrackRumbleStrength"), 0, settingsFilename);
|
||||||
|
int BridgeRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("BridgeRumble"), 0, settingsFilename);
|
||||||
|
int BridgeRumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("BridgeRumbleStrength"), 0, settingsFilename);
|
||||||
|
|
||||||
|
int ff1 = helpers->ReadInt32(0xA46974, /* isRelativeOffset */ true); //shake
|
||||||
|
int ff2 = helpers->ReadInt32(0x00A416E4,/* isRelativeOffset */ true);
|
||||||
|
int ff3 = helpers->ReadInt32(ff2 + 0x628, /* isRelativeOffset */ false); // terrain data
|
||||||
|
int Gas = helpers->ReadInt32(0xA455C0, /* isRelativeOffset */ true); //0-255 accl
|
||||||
|
int ff5 = helpers->ReadInt32(ff2 + 0x658, /* isRelativeOffset */ false); //kart flying or on ground
|
||||||
|
int ff6 = helpers->ReadInt32(0x00A309A0,/* isRelativeOffset */ true);
|
||||||
|
int ff7 = helpers->ReadInt32(ff6 + 0x304, /* isRelativeOffset */ false);
|
||||||
|
int ff8 = helpers->ReadInt32(ff7 + 0xE8, /* isRelativeOffset */ false);
|
||||||
|
int ff9 = helpers->ReadInt32(ff8 + 0x64, /* isRelativeOffset */ false);
|
||||||
|
int ff10 = helpers->ReadInt32(ff9 + 0x38, /* isRelativeOffset */ false);
|
||||||
|
int ff11 = helpers->ReadInt32(ff10 + 0x4C4, /* isRelativeOffset */ false); // 1 during race only
|
||||||
|
float Speed = helpers->ReadFloat32(ff2 + 0x558, /* isRelativeOffset */ false); //Speed of Kart
|
||||||
|
UINT8 ff13 = helpers->ReadByte(0xA39690, /* isRelativeOffset */ true); //picking up coins
|
||||||
|
UINT8 ff14 = helpers->ReadByte(0xA4528D, /* isRelativeOffset */ true); //picking up weapon box
|
||||||
|
UINT8 Wheel = helpers->ReadByte(0xA4652D, /* isRelativeOffset */ true); //0-255 steering
|
||||||
|
INT_PTR ff16 = helpers->ReadIntPtr(0x00A2E284, /* isRelativeOffset*/ true);
|
||||||
|
UINT8 ff17 = helpers->ReadByte(ff2 + 0x674, /* isRelativeOffset */ false); // Drift
|
||||||
|
UINT8 ff18 = helpers->ReadByte(ff16 + 0x3A4, /* isRelativeOffset */ false); // Boost
|
||||||
|
|
||||||
|
int static oldcoins = 0;
|
||||||
|
int newcoins = ff13;
|
||||||
|
int static oldweapon = 0;
|
||||||
|
int newweapon = ff14;
|
||||||
|
int static oldhitground = 0;
|
||||||
|
int newhitground = ff5;
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff1);
|
||||||
|
helpers->log((char *)ffs.c_str()); helpers->log("got value: ");
|
||||||
|
|
||||||
|
if ((ConstantEffectForSteering == 1) && (ff11 == 1))
|
||||||
|
{
|
||||||
|
if ((Wheel >= 0) & (Wheel < 128))
|
||||||
|
{
|
||||||
|
double percentForce = ((128 - Wheel) / (ConstantEffectForSteeringStrength / 1.0));
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((Wheel > 127) & (Wheel < 256))
|
||||||
|
{
|
||||||
|
double percentForce = ((Wheel - 127) / (ConstantEffectForSteeringStrength / 1.0));
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((MainShakeRumble == 1) & (4194308 == ff1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Large Shake when hitting walls, other karts or getting hit by items
|
||||||
|
double percentForce = ((MainShakeRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (500);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((BoostRumble == 1) & (ff18 == 1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when Boost
|
||||||
|
double percentForce = ((BoostRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(60, 60, percentForce);
|
||||||
|
}
|
||||||
|
else if ((DriftRumble == 1) & (ff17 == 1) & (Wheel >= 0) & (Wheel < 128) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Drift Effect including steering left
|
||||||
|
double percentForce = (((128 - Wheel) / 128.0) * (DriftRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((DriftRumble == 1) & (ff17 == 1) & (Wheel > 127) & (Wheel < 256) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Drift Effect including steering right
|
||||||
|
double percentForce = (((Wheel - 127) / 128.0) * (DriftRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((HitGroundRumble == 1) & (oldhitground != newhitground) & (ff5 == 1) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when hitting ground
|
||||||
|
double percentForce = ((HitGroundRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
Sleep(50);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((WeaponRumble == 1) & (oldweapon != newweapon) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when picking up new weapons or using them
|
||||||
|
double percentForce = ((WeaponRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (300);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(80, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((CoinRumble == 1) & (oldcoins != newcoins) & (ff11 == 1))
|
||||||
|
{
|
||||||
|
// Shake when picking up coins
|
||||||
|
double percentForce = ((CoinRumbleStrength) / 100);
|
||||||
|
double percentLength = (200);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((DirtRumble == 1) & (3 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// small friction when driving on dirt while moving
|
||||||
|
double percentForce = ((DirtRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((SpeedBumpRumble == 1) & (10 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Small constant when hitting bumps
|
||||||
|
double percentForce = ((SpeedBumpRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 0);
|
||||||
|
}
|
||||||
|
else if ((GrassRumble == 1) & (4 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Wheel rumbles while driving on grass
|
||||||
|
double percentForce = ((GrassRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((CarpetRumble == 1) & (9 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
// Wheel rumbles while driving on carpet
|
||||||
|
double percentForce = ((CarpetRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((WaterRumble == 1) & (7 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1) & (Wheel >= 0) & (Wheel < 128))
|
||||||
|
{
|
||||||
|
//wheel hard to turn while driving through water
|
||||||
|
double percentForce = ((WaterRumbleWheelStrength) / 100.0);
|
||||||
|
double percentForce1 = ((128 - Wheel / 128.0) * (WaterRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce1, 0, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((WaterRumble == 1) & (7 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1) & (Wheel > 127))
|
||||||
|
{
|
||||||
|
double percentForce = ((WaterRumbleWheelStrength) / 100.0);
|
||||||
|
double percentForce1 = ((Wheel - 127 / 128.0) * (WaterRumbleControllerStrengthMultiplier / 100.0));
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce1, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((TileRumble == 1) & (12 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over tiles
|
||||||
|
double percentForce = ((TileRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (150);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((SandRumble == 1) & (14 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over sand
|
||||||
|
double percentForce = ((SandRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (50);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Sine(70, 70, percentForce);
|
||||||
|
}
|
||||||
|
else if ((RoughTrackRumble == 1) & (11 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles lightly when driving over rough part of track
|
||||||
|
double percentForce = ((RoughTrackRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Sine(40, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((BridgeRumble == 1) & (8 == ff3) & (ff11 == 1) & (ff5 == 1) & (Speed > 0.1))
|
||||||
|
{
|
||||||
|
//Wheel rumbles moderately when driving over wooden bridges
|
||||||
|
double percentForce = ((BridgeRumbleStrength) / 100.0);
|
||||||
|
double percentLength = (100);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(180, 150, percentForce);
|
||||||
|
}
|
||||||
|
oldcoins = newcoins;
|
||||||
|
oldweapon = newweapon;
|
||||||
|
oldhitground = newhitground;
|
||||||
|
}
|
8
Game Files/MarioKartGPDX1.10.h
Normal file
8
Game Files/MarioKartGPDX1.10.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class MarioKartGPDX110 : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
462
Game Files/OutRun2Fake.cpp
Normal file
462
Game Files/OutRun2Fake.cpp
Normal file
@ -0,0 +1,462 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "Outrun2Fake.h"
|
||||||
|
|
||||||
|
void OutRun2Fake::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
int ff = helpers->ReadInt32(0x0827A1A0, /* isRelativeOffset */ false);
|
||||||
|
int ffwall = helpers->ReadInt32(0x08273FAC, /* isRelativeOffset */ false);
|
||||||
|
float ffspeed = helpers->ReadFloat32(0x08273DF0, /* isRelativeOffset */ false); //speedo
|
||||||
|
int ff3 = helpers->ReadInt32(0x0827A1DA, /* isRelativeOffset */ false);
|
||||||
|
int ff4 = helpers->ReadInt32(0x0827A35D, /* isRelativeOffset */ false);
|
||||||
|
int ff5 = helpers->ReadInt32(0x0827A1D4, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff6 = helpers->ReadByte(0x08670DC8, /* isRelativeOffset */ false); // steering
|
||||||
|
float ff7 = helpers->ReadFloat32(0x08273AD4, /* isRelativeOffset */ false);
|
||||||
|
UINT8 ff8 = helpers->ReadByte(0x08304ADC, /* isRelativeOffset */ false); // 1 when race
|
||||||
|
UINT8 ff9 = helpers->ReadByte(0x086749CA, /* isRelativeOffset */ false); // 1 when menu
|
||||||
|
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
int static oldFloat = 0.0;
|
||||||
|
int newFloat = ff3;
|
||||||
|
int static oldFloat1 = 0.0;
|
||||||
|
int newFloat1 = ff4;
|
||||||
|
if (FFBMode == 1)
|
||||||
|
{
|
||||||
|
if ((ff6 >= 0x00) & (ff6 < 0x7F) & (ff8 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((127 - ff6) / 127.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
if ((ff6 > 0x7F) & (ff6 < 0x100) & (ff8 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((ff6 - 127) / 128.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
if ((ff6 >= 0x00) & (ff6 < 0x7F) & (ff9 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((127 - ff6) / 127.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
if ((ff6 > 0x7F) & (ff6 < 0x100) & (ff9 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((ff6 - 127) / 128.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
if ((oldFloat != newFloat) & (ffspeed >= 0.1) & (ffspeed <= 80) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 80.1) & (ffspeed <= 130) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 130.1) & (ffspeed <= 180) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 180.1) & (ffspeed <= 220) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 220.1) & (ffspeed <= 270) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 270.1) & (ffspeed <= 320) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 320.1) & (ffspeed <= 380) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 380.1) & (ffspeed <= 430) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.8);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 430.1) & (ffspeed <= 500) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 500.1) & (ffspeed <= 1000) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 0.1) & (ffspeed <= 80) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 80.1) & (ffspeed <= 130) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 130.1) & (ffspeed <= 180) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 180.1) & (ffspeed <= 220) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 220.1) & (ffspeed <= 270) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 270.1) & (ffspeed <= 320) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 320.1) & (ffspeed <= 380) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 380.1) & (ffspeed <= 430) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.8);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 430.1) & (ffspeed <= 500) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 500.1) & (ffspeed <= 1000) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((ff6 >= 0x00) & (ff6 < 0x7F) & (ff8 == 1) & (FFBMode == 0))
|
||||||
|
{
|
||||||
|
double percentForce = ((127 - ff6) / 127.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
if ((ff6 > 0x7F) & (ff6 < 0x100) & (ff8 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((ff6 - 127) / 128.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
if ((ff6 >= 0x00) & (ff6 < 0x7F) & (ff9 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((127 - ff6) / 127.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
if ((ff6 > 0x7F) & (ff6 < 0x100) & (ff9 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = ((ff6 - 127) / 128.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
if ((oldFloat != newFloat) & (ffspeed >= 0.1) & (ffspeed <= 80) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 80.1) & (ffspeed <= 130) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 130.1) & (ffspeed <= 180) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 180.1) & (ffspeed <= 220) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 220.1) & (ffspeed <= 270) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 270.1) & (ffspeed <= 320) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 320.1) & (ffspeed <= 380) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 380.1) & (ffspeed <= 430) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.8);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 430.1) & (ffspeed <= 500) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 500.1) & (ffspeed <= 1000) & (ff5 == 2))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 0.1) & (ffspeed <= 80) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 80.1) & (ffspeed <= 130) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 130.1) & (ffspeed <= 180) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 180.1) & (ffspeed <= 220) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 220.1) & (ffspeed <= 270) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 270.1) & (ffspeed <= 320) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 320.1) & (ffspeed <= 380) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 380.1) & (ffspeed <= 430) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.8);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 430.1) & (ffspeed <= 500) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat != newFloat) & (ffspeed >= 500.1) & (ffspeed <= 1000) & (ff5 == 1))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((oldFloat1 != newFloat1) & (ffspeed >= 0.1) & (ffspeed <= 50))
|
||||||
|
{
|
||||||
|
double percentForce = (0.1);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 50.1) & (ffspeed <= 100))
|
||||||
|
{
|
||||||
|
double percentForce = (0.2);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 100.1) & (ffspeed <= 150))
|
||||||
|
{
|
||||||
|
double percentForce = (0.3);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 150.1) & (ffspeed <= 200))
|
||||||
|
{
|
||||||
|
double percentForce = (0.4);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 200.1) & (ffspeed <= 250))
|
||||||
|
{
|
||||||
|
double percentForce = (0.5);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 250.1) & (ffspeed <= 300))
|
||||||
|
{
|
||||||
|
double percentForce = (0.6);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 300.1) & (ffspeed <= 350))
|
||||||
|
{
|
||||||
|
double percentForce = (0.7);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 350.1) & (ffspeed <= 400))
|
||||||
|
{
|
||||||
|
double percentForce = (0.8);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 450.1) & (ffspeed <= 500))
|
||||||
|
{
|
||||||
|
double percentForce = (0.9);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((oldFloat1 != newFloat1) & (ffspeed >= 500.1) & (ffspeed <= 1000))
|
||||||
|
{
|
||||||
|
double percentForce = (1.0);
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(200, 200, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff == 8) & (ffspeed >= 0.1) & (ffspeed <= 1000))
|
||||||
|
{
|
||||||
|
double percentForce = 0.1;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(70, 70, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff == 4) & (ffspeed >= 0.1) & (ffspeed <= 1000))
|
||||||
|
{
|
||||||
|
double percentForce = 0.2;
|
||||||
|
double percentLength = 50;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(50, 50, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff == 16) & (ffspeed >= 0.1) & (ffspeed <= 1000))
|
||||||
|
{
|
||||||
|
double percentForce = 0.2;
|
||||||
|
double percentLength = 50;
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
triggers->Sine(100, 50, percentForce);
|
||||||
|
}
|
||||||
|
oldFloat = newFloat;
|
||||||
|
oldFloat1 = newFloat1;
|
||||||
|
}
|
7
Game Files/OutRun2Fake.h
Normal file
7
Game Files/OutRun2Fake.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class OutRun2Fake : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
62
Game Files/OutRun2Real.cpp
Normal file
62
Game Files/OutRun2Real.cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "Outrun2Real.h"
|
||||||
|
EffectTriggers* myTriggers;
|
||||||
|
EffectConstants *myConstants;
|
||||||
|
Helpers *myHelpers;
|
||||||
|
|
||||||
|
void SendForceFeedback(__int8 force)
|
||||||
|
{
|
||||||
|
if (force >= 1 && force <= 0x0F)
|
||||||
|
{
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
double percentForce = (16 - force) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
//myHelpers->log("got value: ");
|
||||||
|
//std::string ffs = std::to_string(force);
|
||||||
|
//myHelpers->log((char *)ffs.c_str());
|
||||||
|
myTriggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
myTriggers->Constant(myConstants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if (force >= 0x10 && force <= 0x1E)
|
||||||
|
{
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
double percentForce = (31 - force) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
//myHelpers->log("got value: ");
|
||||||
|
//std::string ffs = std::to_string(force);
|
||||||
|
//myHelpers->log((char *)ffs.c_str());
|
||||||
|
myTriggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
myTriggers->Constant(myConstants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
signed int cdecl or2FfbFunction(unsigned __int8 unk1, unsigned __int8 unk2, unsigned __int8 force, char unk3)
|
||||||
|
{
|
||||||
|
if (unk1 == 0x7D)
|
||||||
|
{
|
||||||
|
// not used afaik
|
||||||
|
}
|
||||||
|
if (unk1 == 0x7B)
|
||||||
|
{
|
||||||
|
SendForceFeedback(force);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void OutRun2Real::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
bool init = false;
|
||||||
|
if (!init)
|
||||||
|
{
|
||||||
|
DWORD tempdw = 0x08105A48;
|
||||||
|
DWORD cock = (DWORD)(void *)or2FfbFunction;
|
||||||
|
DWORD tempdw2 = cock - tempdw - 5;
|
||||||
|
*(BYTE *)tempdw = 0xE9;
|
||||||
|
*(DWORD *)(tempdw + 1) = tempdw2;
|
||||||
|
init = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
myTriggers = triggers;
|
||||||
|
myConstants = constants;
|
||||||
|
myHelpers = helpers;
|
||||||
|
}
|
7
Game Files/OutRun2Real.h
Normal file
7
Game Files/OutRun2Real.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class OutRun2Real : public Game {
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
51
Game Files/PokkenTournament.cpp
Normal file
51
Game Files/PokkenTournament.cpp
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "PokkenTournament.h"
|
||||||
|
|
||||||
|
void PokkenTournament::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
|
||||||
|
INT_PTR ffAddress = helpers->ReadIntPtr(0x00E97F10, /* isRelativeOffset*/ true);
|
||||||
|
INT_PTR ff1 = helpers->ReadIntPtr(ffAddress + 0x60, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff2 = helpers->ReadIntPtr(ff1 + 0x8, /* isRelativeOffset */ false);
|
||||||
|
float ff3 = helpers->ReadFloat32(ff2 + 0xCC, /* isRelativeOffset */ false); //health
|
||||||
|
INT_PTR ffAddress4 = helpers->ReadIntPtr(0x00EC4C20, /* isRelativeOffset*/ true);
|
||||||
|
INT_PTR ff5 = helpers->ReadIntPtr(ffAddress4 + 0x60, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff6 = helpers->ReadIntPtr(ff5 + 0x120, /* isRelativeOffset */ false);
|
||||||
|
INT_PTR ff7 = helpers->ReadIntPtr(ff6 + 0x698, /* isRelativeOffset */ false); //1 during battle except for first startup
|
||||||
|
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int RumbleStrength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleStrength"), 0, settingsFilename);
|
||||||
|
int RumbleLength = GetPrivateProfileInt(TEXT("Settings"), TEXT("RumbleLength"), 0, settingsFilename);
|
||||||
|
int HowtoRumble = GetPrivateProfileInt(TEXT("Settings"), TEXT("HowtoRumble"), 0, settingsFilename);
|
||||||
|
|
||||||
|
float static oldFloat = 0.0;
|
||||||
|
float newFloat = ff3;
|
||||||
|
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff3);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
|
||||||
|
if ((oldFloat != newFloat))
|
||||||
|
{
|
||||||
|
if (HowtoRumble == 0)
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumble == 1)
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
}
|
||||||
|
else if (HowtoRumble == 2)
|
||||||
|
{
|
||||||
|
double percentForce = ((RumbleStrength) / 100.0);
|
||||||
|
double percentLength = (RumbleLength);
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
oldFloat = newFloat;
|
||||||
|
}
|
8
Game Files/PokkenTournament.h
Normal file
8
Game Files/PokkenTournament.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class PokkenTournament : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
1226
Game Files/RoadFighters3D.cpp
Normal file
1226
Game Files/RoadFighters3D.cpp
Normal file
File diff suppressed because it is too large
Load Diff
7
Game Files/RoadFighters3D.h
Normal file
7
Game Files/RoadFighters3D.h
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class RoadFighters3D : public Game {
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
92
Game Files/SegaRacingClassic.cpp
Normal file
92
Game Files/SegaRacingClassic.cpp
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "SegaRacingClassic.h"
|
||||||
|
|
||||||
|
void SegaRacingClassic::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
UINT8 ff = helpers->ReadByte(0x834C19, /* isRelativeOffset */ false);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
wchar_t *settingsFilename = TEXT(".\\FFBPlugin.ini");
|
||||||
|
int FFBMode = GetPrivateProfileInt(TEXT("Settings"), TEXT("FFBMode"), 0, settingsFilename);
|
||||||
|
|
||||||
|
if (FFBMode == 0)
|
||||||
|
{
|
||||||
|
if ((ff > 0xD7) & (ff < 0xE0))
|
||||||
|
{
|
||||||
|
//Clutch
|
||||||
|
double percentForce = (224 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0xBF) & (ff < 0xC8))
|
||||||
|
{
|
||||||
|
//Centering
|
||||||
|
double percentForce = (200 - ff ) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Spring(percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0xB7) & (ff < 0xC0))
|
||||||
|
{
|
||||||
|
//Uncentering
|
||||||
|
double percentForce = (192 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Sine(70, 80, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0xA7) & (ff < 0xB0))
|
||||||
|
{
|
||||||
|
//Roll Left
|
||||||
|
double percentForce = (176 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
}
|
||||||
|
else if ((ff > 0x97) & (ff < 0xA0))
|
||||||
|
{
|
||||||
|
//Roll Right
|
||||||
|
double percentForce = (160 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((ff > 0xD7) & (ff < 0xE0))
|
||||||
|
{
|
||||||
|
//Clutch
|
||||||
|
double percentForce = (224 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Friction(pow(percentForce, 0.5));
|
||||||
|
}
|
||||||
|
else if ((ff > 0xBF) & (ff < 0xC8))
|
||||||
|
{
|
||||||
|
//Centering
|
||||||
|
double percentForce = (200 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Spring(pow(percentForce, 0.5));
|
||||||
|
}
|
||||||
|
else if ((ff > 0xB7) & (ff < 0xC0))
|
||||||
|
{
|
||||||
|
//Uncentering
|
||||||
|
double percentForce = (192 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->Sine(70, 80, pow(percentForce, 0.5));
|
||||||
|
}
|
||||||
|
else if ((ff > 0xA7) & (ff < 0xB0))
|
||||||
|
{
|
||||||
|
//Roll Left
|
||||||
|
double percentForce = (176 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, pow(percentForce, 0.5), percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
else if ((ff > 0x97) & (ff < 0xA0))
|
||||||
|
{
|
||||||
|
//Roll Right
|
||||||
|
double percentForce = (160 - ff) / 8.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(pow(percentForce, 0.5), 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, (pow(percentForce, 0.5)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/SegaRacingClassic.h
Normal file
8
Game Files/SegaRacingClassic.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class SegaRacingClassic : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
39
Game Files/SegaRally3.cpp
Normal file
39
Game Files/SegaRally3.cpp
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "SegaRally3.h"
|
||||||
|
|
||||||
|
void SegaRally3::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
helpers->log("in SR3 Ffbloop");
|
||||||
|
const int ff = GetTeknoParrotFFB();
|
||||||
|
std::string ffs = std::to_string(ff);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if (ff > 15)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
// assume that 30 is the weakest and 16 is the strongest
|
||||||
|
double percentForce = (31 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else if (ff > 0)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
// assume that 1 is the strongest and 15 is the weakest
|
||||||
|
double percentForce = (16 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/SegaRally3.h
Normal file
8
Game Files/SegaRally3.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/TeknoParrotGame.h"
|
||||||
|
|
||||||
|
class SegaRally3 : public TeknoParrotGame {
|
||||||
|
public:
|
||||||
|
SegaRally3() : TeknoParrotGame() { }
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
43
Game Files/SonicSegaAllStarsRacing.cpp
Normal file
43
Game Files/SonicSegaAllStarsRacing.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "SonicSegaAllStarsRacing.h"
|
||||||
|
|
||||||
|
void SonicSegaAllStarsRacing::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
INT_PTR FFBEnable = helpers->ReadByte(0x5CD858, /* isRelativeOffset*/ true);
|
||||||
|
INT_PTR FFB = helpers->ReadByte(0x5CD864, /* isRelativeOffset*/ true);
|
||||||
|
|
||||||
|
{
|
||||||
|
//Enable FFB
|
||||||
|
helpers->WriteByte(0x5CD858, 0x03, true);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
//Trigger friction to stop any oscillation
|
||||||
|
double percentForce = 0.2;
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
if ((FFB > 0) & (FFB < 19))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (FFB) / 18.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if ((FFB > 237) & (FFB < 256))
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (256 - FFB) / 18.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/SonicSegaAllStarsRacing.h
Normal file
8
Game Files/SonicSegaAllStarsRacing.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class SonicSegaAllStarsRacing : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
40
Game Files/TestGame.cpp
Normal file
40
Game Files/TestGame.cpp
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "TestGame.h"
|
||||||
|
|
||||||
|
//settingsFN copied from DllMain.cpp; renamed from settingsFilename
|
||||||
|
wchar_t *settingsFN = TEXT(".\\FFBPlugin.ini");
|
||||||
|
|
||||||
|
//GameId test values:
|
||||||
|
//const int TEST_GAME_CONST = -1;
|
||||||
|
//const int TEST_GAME_SINE = -2;
|
||||||
|
//const int TEST_GAME_FRICTION = -3;
|
||||||
|
//const int TEST_GAME_SPRING = -4;
|
||||||
|
//const int TEST_GAME_HEAVY = -5;
|
||||||
|
//const int TEST_GAME_LOOSE = -6;
|
||||||
|
int configGameIdEffect = GetPrivateProfileInt(TEXT("Settings"), TEXT("GameId"), 1, settingsFN);
|
||||||
|
|
||||||
|
void TestGame::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
switch (configGameIdEffect) {
|
||||||
|
case -1:
|
||||||
|
// turn left
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, 1);
|
||||||
|
break;
|
||||||
|
case -2:
|
||||||
|
triggers->Sine(125, 100, 0.25);
|
||||||
|
break;
|
||||||
|
case -3:
|
||||||
|
triggers->Friction(1);
|
||||||
|
break;
|
||||||
|
case -4:
|
||||||
|
triggers->Spring(1);
|
||||||
|
break;
|
||||||
|
case -5:
|
||||||
|
triggers->Friction(1);
|
||||||
|
triggers->Spring(1);
|
||||||
|
break;
|
||||||
|
case -6:
|
||||||
|
triggers->Friction(0);
|
||||||
|
triggers->Spring(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/TestGame.h
Normal file
8
Game Files/TestGame.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class TestGame : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
57
Game Files/WMMT5.cpp
Normal file
57
Game Files/WMMT5.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "WMMT5.h"
|
||||||
|
|
||||||
|
void WMMT5::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
float roll = helpers->ReadFloat32(0x196F194, /* isRelativeOffset*/ true);
|
||||||
|
float friction = helpers->ReadFloat32(0x196F18C, /* isRelativeOffset*/ true);
|
||||||
|
float sine = helpers->ReadFloat32(0x196F188, /* isRelativeOffset*/ true);
|
||||||
|
helpers->log("got value: ");
|
||||||
|
std::string ffs = std::to_string(roll);
|
||||||
|
helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
{
|
||||||
|
//Trigger Spring the entire time like real cabinet
|
||||||
|
double percentForce = 0.7;
|
||||||
|
triggers->Springi(percentForce);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (0 < roll)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (1.0 - roll);
|
||||||
|
double percentLength = (250);
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (0 > roll)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (roll + 1.0);
|
||||||
|
double percentLength = (250);
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (0 < friction)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (0.7 - friction);
|
||||||
|
triggers->Friction(percentForce);
|
||||||
|
}
|
||||||
|
else if (0 < sine)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
double percentForce = (0.6 - sine);
|
||||||
|
triggers->Sine(120, 120, percentForce);
|
||||||
|
}
|
||||||
|
else if (0 > sine)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
double percentForce = (sine + 0.6);
|
||||||
|
triggers->Sine(120, 120, percentForce);
|
||||||
|
}
|
||||||
|
}
|
8
Game Files/WMMT5.h
Normal file
8
Game Files/WMMT5.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
class WMMT5 : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
122
Game Files/WackyRaces.cpp
Normal file
122
Game Files/WackyRaces.cpp
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
#include <string>
|
||||||
|
#include "WackyRaces.h"
|
||||||
|
|
||||||
|
int ttx2wr(int ffRaw) {
|
||||||
|
switch (ffRaw) {
|
||||||
|
// moving left, from weakest to strongest (30 => 16).
|
||||||
|
case 4096:
|
||||||
|
return 30;
|
||||||
|
case 64:
|
||||||
|
return 29;
|
||||||
|
case 4160:
|
||||||
|
return 28;
|
||||||
|
case 2048:
|
||||||
|
return 27;
|
||||||
|
case 6144:
|
||||||
|
return 26;
|
||||||
|
case 2112:
|
||||||
|
return 25;
|
||||||
|
case 6208:
|
||||||
|
return 24;
|
||||||
|
case 32:
|
||||||
|
return 23;
|
||||||
|
case 4128:
|
||||||
|
return 22;
|
||||||
|
case 96:
|
||||||
|
return 21;
|
||||||
|
case 4192:
|
||||||
|
return 20;
|
||||||
|
case 2080:
|
||||||
|
return 19;
|
||||||
|
case 6176:
|
||||||
|
return 18;
|
||||||
|
case 2144:
|
||||||
|
return 17;
|
||||||
|
case 6240:
|
||||||
|
return 16;
|
||||||
|
// moving right, from weakest to strongest (15 => 1)
|
||||||
|
case 12288:
|
||||||
|
return 15;
|
||||||
|
case 8256:
|
||||||
|
return 14;
|
||||||
|
case 12352:
|
||||||
|
return 13;
|
||||||
|
case 10240:
|
||||||
|
return 12;
|
||||||
|
case 14336:
|
||||||
|
return 11;
|
||||||
|
case 10304:
|
||||||
|
return 10;
|
||||||
|
case 14400:
|
||||||
|
return 9;
|
||||||
|
case 8224:
|
||||||
|
return 8;
|
||||||
|
case 12320:
|
||||||
|
return 7;
|
||||||
|
case 8288:
|
||||||
|
return 6;
|
||||||
|
case 12384:
|
||||||
|
return 5;
|
||||||
|
case 10272:
|
||||||
|
return 4;
|
||||||
|
case 14368:
|
||||||
|
return 3;
|
||||||
|
case 10336:
|
||||||
|
return 2;
|
||||||
|
case 14432:
|
||||||
|
return 1;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WackyRaces::FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers) {
|
||||||
|
|
||||||
|
int ff = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
long ffAddress = helpers->ReadInt32(0x7E00590, /* isRelativeOffset*/ true);
|
||||||
|
int ffRaw = helpers->ReadInt32(ffAddress + 0x45, /* isRelativeOffset */ false);
|
||||||
|
int lampArray[7] = { 16, 1024, 512, 128, 8, 256, 16384 };
|
||||||
|
for (int i = 0; i < 7; i++) {
|
||||||
|
if ((ffRaw & lampArray[i]) == lampArray[i]) {
|
||||||
|
ffRaw -= lampArray[i];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
ff = ttx2wr(ffRaw);
|
||||||
|
}
|
||||||
|
|
||||||
|
//helpers->log("got value: ");
|
||||||
|
//std::string ffs = std::to_string(ff);
|
||||||
|
//helpers->log((char *)ffs.c_str());
|
||||||
|
|
||||||
|
if (ff > 15)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel left");
|
||||||
|
// assume that 30 is the weakest and 16 is the strongest
|
||||||
|
double percentForce = (31 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from left => makes wheel turn right
|
||||||
|
triggers->LeftRight(0, percentForce, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_RIGHT, percentForce); // old logic: 31 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else if (ff > 0)
|
||||||
|
{
|
||||||
|
helpers->log("moving wheel right");
|
||||||
|
// assume that 1 is the strongest and 15 is the weakest
|
||||||
|
double percentForce = (16 - ff) / 15.0;
|
||||||
|
double percentLength = 100;
|
||||||
|
// direction from right => makes wheel turn left
|
||||||
|
triggers->LeftRight(percentForce, 0, percentLength);
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, percentForce); // old logic: 15 - ff
|
||||||
|
lastWasStop = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (lastWasStop == 0) {
|
||||||
|
triggers->Constant(constants->DIRECTION_FROM_LEFT, 0); // just pass the hash of 0 strength so we update lastEffectHash & lastEffectTime
|
||||||
|
lastWasStop = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
9
Game Files/WackyRaces.h
Normal file
9
Game Files/WackyRaces.h
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../Common Files/Game.h"
|
||||||
|
|
||||||
|
class WackyRaces : public Game {
|
||||||
|
int lastWasStop = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void FFBLoop(EffectConstants *constants, Helpers *helpers, EffectTriggers* triggers);
|
||||||
|
};
|
225
IDirectInputDevice.cpp
Normal file
225
IDirectInputDevice.cpp
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
#include "IDirectInputDevice.h"
|
||||||
|
|
||||||
|
DirectInputDeviceWrapper::DirectInputDeviceWrapper(LPVOID device, bool unicode)
|
||||||
|
{
|
||||||
|
useUnicode = unicode;
|
||||||
|
if (unicode)
|
||||||
|
{
|
||||||
|
pDeviceW = (LPDIRECTINPUTDEVICE8W)device;
|
||||||
|
pDeviceA = NULL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pDeviceA = (LPDIRECTINPUTDEVICE8A)device;
|
||||||
|
pDeviceW = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DirectInputDeviceWrapper::~DirectInputDeviceWrapper(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::QueryInterface(REFIID riid, LPVOID* ppvObj)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->QueryInterface(riid, ppvObj);
|
||||||
|
return pDeviceW->QueryInterface(riid, ppvObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE DirectInputDeviceWrapper::AddRef(void)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->AddRef();
|
||||||
|
return pDeviceW->AddRef();
|
||||||
|
}
|
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE DirectInputDeviceWrapper::Release(void)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Release();
|
||||||
|
return pDeviceW->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::Acquire(void)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Acquire();
|
||||||
|
return pDeviceW->Acquire();
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::CreateEffect(REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT* ppdeff, LPUNKNOWN punkOuter)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->CreateEffect(rguid, lpeff, ppdeff, punkOuter);
|
||||||
|
return pDeviceW->CreateEffect(rguid, lpeff, ppdeff, punkOuter);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::EnumCreatedEffectObjects(LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->EnumCreatedEffectObjects(lpCallback, pvRef, fl);
|
||||||
|
return pDeviceW->EnumCreatedEffectObjects(lpCallback, pvRef, fl);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::EnumEffects(LPDIENUMEFFECTSCALLBACK lpCallback, LPVOID pvRef, DWORD dwEffType)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->EnumEffects((LPDIENUMEFFECTSCALLBACKA) lpCallback, pvRef, dwEffType);
|
||||||
|
return pDeviceW->EnumEffects(lpCallback, pvRef, dwEffType);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::EnumEffectsInFile(LPCTSTR lptszFileName, LPDIENUMEFFECTSINFILECALLBACK pec, LPVOID pvRef, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->EnumEffectsInFile((LPCSTR) lptszFileName, pec, pvRef, dwFlags);
|
||||||
|
return pDeviceW->EnumEffectsInFile(lptszFileName, pec, pvRef, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::EnumObjects(LPDIENUMDEVICEOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->EnumObjects((LPDIENUMDEVICEOBJECTSCALLBACKA)lpCallback, pvRef, dwFlags);
|
||||||
|
return pDeviceW->EnumObjects(lpCallback, pvRef, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::Escape(LPDIEFFESCAPE pesc)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Escape(pesc);
|
||||||
|
return pDeviceW->Escape(pesc);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetCapabilities(LPDIDEVCAPS lpDIDevCaps)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetCapabilities(lpDIDevCaps);
|
||||||
|
return pDeviceW->GetCapabilities(lpDIDevCaps);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetDeviceData(DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetDeviceData(cbObjectData, rgdod, pdwInOut, dwFlags);
|
||||||
|
return pDeviceW->GetDeviceData(cbObjectData, rgdod, pdwInOut, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetDeviceInfo(LPDIDEVICEINSTANCE pdidi)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetDeviceInfo((LPDIDEVICEINSTANCEA) pdidi);
|
||||||
|
return pDeviceW->GetDeviceInfo(pdidi);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetDeviceState(DWORD cbData, LPVOID lpvData)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetDeviceState(cbData, lpvData);
|
||||||
|
return pDeviceW->GetDeviceState(cbData, lpvData);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetEffectInfo(LPDIEFFECTINFO pdei, REFGUID rguid)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetEffectInfo((LPDIEFFECTINFOA) pdei, rguid);
|
||||||
|
return pDeviceW->GetEffectInfo(pdei, rguid);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetForceFeedbackState(LPDWORD pdwOut)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetForceFeedbackState(pdwOut);
|
||||||
|
return pDeviceW->GetForceFeedbackState(pdwOut);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetObjectInfo(LPDIDEVICEOBJECTINSTANCE pdidoi, DWORD dwObj, DWORD dwHow)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetObjectInfo((LPDIDEVICEOBJECTINSTANCEA) pdidoi, dwObj, dwHow);
|
||||||
|
return pDeviceW->GetObjectInfo(pdidoi, dwObj, dwHow);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetProperty(REFGUID rguidProp, LPDIPROPHEADER pdiph)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetProperty(rguidProp, pdiph);
|
||||||
|
return pDeviceW->GetProperty(rguidProp, pdiph);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::Initialize(HINSTANCE hinst, DWORD dwVersion, REFGUID rguid)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Initialize(hinst, dwVersion, rguid);
|
||||||
|
return pDeviceW->Initialize(hinst, dwVersion, rguid);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::Poll(void)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Poll();
|
||||||
|
return pDeviceW->Poll();
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::RunControlPanel(HWND hwndOwner, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->RunControlPanel(hwndOwner, dwFlags);
|
||||||
|
return pDeviceW->RunControlPanel(hwndOwner, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SendDeviceData(DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SendDeviceData(cbObjectData, rgdod, pdwInOut, fl);
|
||||||
|
return pDeviceW->SendDeviceData(cbObjectData, rgdod, pdwInOut, fl);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SendForceFeedbackCommand(DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SendForceFeedbackCommand(dwFlags);
|
||||||
|
return pDeviceW->SendForceFeedbackCommand(dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool hackFix = false;
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SetCooperativeLevel(HWND hwnd, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (hackFix)
|
||||||
|
{
|
||||||
|
if (dwFlags & DISCL_EXCLUSIVE)
|
||||||
|
{
|
||||||
|
dwFlags &= ~DISCL_EXCLUSIVE;
|
||||||
|
dwFlags |= DISCL_NONEXCLUSIVE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (pDeviceA) return pDeviceA->SetCooperativeLevel(hwnd, dwFlags);
|
||||||
|
return pDeviceW->SetCooperativeLevel(hwnd, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SetDataFormat(LPCDIDATAFORMAT lpdf)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SetDataFormat(lpdf);
|
||||||
|
return pDeviceW->SetDataFormat(lpdf);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SetEventNotification(HANDLE hEvent)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SetEventNotification(hEvent);
|
||||||
|
return pDeviceW->SetEventNotification(hEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SetProperty(REFGUID rguidProp, LPCDIPROPHEADER pdiph)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SetProperty(rguidProp, pdiph);
|
||||||
|
return pDeviceW->SetProperty(rguidProp, pdiph);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::Unacquire(void)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->Unacquire();
|
||||||
|
return pDeviceW->Unacquire();
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::WriteEffectToFile(LPCTSTR lptszFileName, DWORD dwEntries, LPDIFILEEFFECT rgDiFileEft, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->WriteEffectToFile((LPCSTR) lptszFileName, dwEntries, rgDiFileEft, dwFlags);
|
||||||
|
return pDeviceW->WriteEffectToFile(lptszFileName, dwEntries, rgDiFileEft, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if DIRECTINPUT_VERSION >= 0x0800
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::BuildActionMap(LPDIACTIONFORMAT lpdiaf, LPCTSTR lpszUserName, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->BuildActionMap((LPDIACTIONFORMATA) lpdiaf, (LPCSTR) lpszUserName, dwFlags);
|
||||||
|
return pDeviceW->BuildActionMap(lpdiaf, lpszUserName, dwFlags);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::GetImageInfo(LPDIDEVICEIMAGEINFOHEADER lpdiDevImageInfoHeader)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->GetImageInfo((LPDIDEVICEIMAGEINFOHEADERA) lpdiDevImageInfoHeader);
|
||||||
|
return pDeviceW->GetImageInfo(lpdiDevImageInfoHeader);
|
||||||
|
}
|
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE DirectInputDeviceWrapper::SetActionMap(LPDIACTIONFORMAT lpdiActionFormat, LPCTSTR lptszUserName, DWORD dwFlags)
|
||||||
|
{
|
||||||
|
if (pDeviceA) return pDeviceA->SetActionMap((LPDIACTIONFORMATA)lpdiActionFormat, (LPCSTR)lptszUserName, dwFlags);
|
||||||
|
return pDeviceW->SetActionMap(lpdiActionFormat, lptszUserName, dwFlags);
|
||||||
|
}
|
||||||
|
#endif
|
54
IDirectInputDevice.h
Normal file
54
IDirectInputDevice.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "dinput.h"
|
||||||
|
|
||||||
|
struct DirectInputDeviceWrapper : public IDirectInputDevice8
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
LPDIRECTINPUTDEVICE8A pDeviceA;
|
||||||
|
LPDIRECTINPUTDEVICE8W pDeviceW;
|
||||||
|
bool useUnicode;
|
||||||
|
|
||||||
|
public:
|
||||||
|
DirectInputDeviceWrapper( LPVOID device, bool unicode );
|
||||||
|
virtual ~DirectInputDeviceWrapper(void);
|
||||||
|
|
||||||
|
public:
|
||||||
|
// -------- METHODS: IUnknown ---------------------------------------------- //
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID* ppvObj);
|
||||||
|
virtual ULONG STDMETHODCALLTYPE AddRef(void);
|
||||||
|
virtual ULONG STDMETHODCALLTYPE Release(void);
|
||||||
|
// -------- METHODS: IDirectInputDevice COMMON ----------------------------- //
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE Acquire(void);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE CreateEffect(REFGUID rguid, LPCDIEFFECT lpeff, LPDIRECTINPUTEFFECT* ppdeff, LPUNKNOWN punkOuter);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE EnumCreatedEffectObjects(LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE EnumEffects(LPDIENUMEFFECTSCALLBACK lpCallback, LPVOID pvRef, DWORD dwEffType);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE EnumEffectsInFile(LPCTSTR lptszFileName, LPDIENUMEFFECTSINFILECALLBACK pec, LPVOID pvRef, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE EnumObjects(LPDIENUMDEVICEOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE Escape(LPDIEFFESCAPE pesc);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetCapabilities(LPDIDEVCAPS lpDIDevCaps);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetDeviceData(DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetDeviceInfo(LPDIDEVICEINSTANCE pdidi);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetDeviceState(DWORD cbData, LPVOID lpvData);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetEffectInfo(LPDIEFFECTINFO pdei, REFGUID rguid);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetForceFeedbackState(LPDWORD pdwOut);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetObjectInfo(LPDIDEVICEOBJECTINSTANCE pdidoi, DWORD dwObj, DWORD dwHow);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetProperty(REFGUID rguidProp, LPDIPROPHEADER pdiph);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE Initialize(HINSTANCE hinst, DWORD dwVersion, REFGUID rguid);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE Poll(void);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE RunControlPanel(HWND hwndOwner, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SendDeviceData(DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SendForceFeedbackCommand(DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetCooperativeLevel(HWND hwnd, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetDataFormat(LPCDIDATAFORMAT lpdf);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetEventNotification(HANDLE hEvent);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetProperty(REFGUID rguidProp, LPCDIPROPHEADER pdiph);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE Unacquire(void);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE WriteEffectToFile(LPCTSTR lptszFileName, DWORD dwEntries, LPDIFILEEFFECT rgDiFileEft, DWORD dwFlags);
|
||||||
|
#if DIRECTINPUT_VERSION >= 0x0800
|
||||||
|
// -------- METHODS: IDirectInputDevice8 ONLY ------------------------------ //
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE BuildActionMap(LPDIACTIONFORMAT lpdiaf, LPCTSTR lpszUserName, DWORD dwFlags);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetImageInfo(LPDIDEVICEIMAGEINFOHEADER lpdiDevImageInfoHeader);
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetActionMap(LPDIACTIONFORMAT lpdiActionFormat, LPCTSTR lptszUserName, DWORD dwFlags);
|
||||||
|
#endif
|
||||||
|
};
|
417
Includes/FFBPlugin.txt
Normal file
417
Includes/FFBPlugin.txt
Normal file
@ -0,0 +1,417 @@
|
|||||||
|
***FFB Arcade Plugin***
|
||||||
|
|
||||||
|
Version 0.8
|
||||||
|
|
||||||
|
Created by Boomslangnz, Ducon2016 & Spazzy.
|
||||||
|
|
||||||
|
This is a plugin to provide Force Feedback and Rumble (and in certain cases added input support) to various arcade games. Initially this was a small project
|
||||||
|
to add FFB to Daytona Championship USA and it grew from there to support several more games and rumble was added.
|
||||||
|
While best efforts were made to try to resemble the real arcade force feedback, It will never be 100% accurate &
|
||||||
|
in some cases eg Mario Kart GP DX, Pokken Tournament and Battle Gear 4. Effects were created entirely from scratch
|
||||||
|
so are not using any real force feedback values
|
||||||
|
|
||||||
|
***0.8 Changes***
|
||||||
|
|
||||||
|
- Sorry! Been so busy,never had time to test last release correctly and upgrading SDL2 version broke effects working correctly on all games!
|
||||||
|
|
||||||
|
Reverting back to SDL2 2.0.5 and modified lindbergh game plugins to load SDL22.dll.
|
||||||
|
|
||||||
|
SDL22.dll will be supplied in plugin folders for Lindbergh games and need to be placed into the Teknoparrot folder INSIDE the MAIN Teknoparrot folder.
|
||||||
|
|
||||||
|
SDL2.dll will still be supplied aswell to be placed in same folder as FFBPlugin.ini if you want to use FFBPluginGUI.exe
|
||||||
|
|
||||||
|
Hopefully this makes sense, please ask if you are confused.
|
||||||
|
|
||||||
|
- Outrun 2 now has 2 x plugins. One is the custom effects created from scratch you have been using all this time :) and the other is using the real FFB Address now.
|
||||||
|
(Big thanks to Reaver for help on getting the real ffb working)
|
||||||
|
|
||||||
|
***0.7 Changes***
|
||||||
|
|
||||||
|
- Upgraded FFB Arcade Plugin to use SDL 2 2.0.9 version compared to the old 2.0.5 used previously. Will sort out FFB Plugin working when using Faudio on new teknoparrot
|
||||||
|
|
||||||
|
***0.6a Changes***
|
||||||
|
|
||||||
|
- Modified GUI to check FFBPlugin and load game settings as soon as you choose Force Feedback Setup or Input Setup instead of having game list and potentially writing unnecessary values to ini
|
||||||
|
|
||||||
|
- Added logo on first GUI page made by POOTERMAN (Thanks mate)
|
||||||
|
|
||||||
|
- Defaulted WMMT5 logging to off as plugin hooks GUI lol
|
||||||
|
|
||||||
|
- Added GUI to every plugin folder by default now as it was confusing users with copying GUI to correct folders etc. I have setup correct 32bit and 64bit exe with each plugin
|
||||||
|
|
||||||
|
- Just a note if you are using Lindbergh games and want to use GUI. Copy MetroFramework.dll & SDL2.dll to same folder as elf file (Where FFBPlugin.ini goes too),
|
||||||
|
opengl32.dll & SDL2.dll goes to Teknoparrot folder as usual. You do not need to copy GUI or Metroframework.dll to Teknoparrot folder at all.
|
||||||
|
|
||||||
|
|
||||||
|
***0.6 Changes***
|
||||||
|
|
||||||
|
- Added support for Mame 0.206 with same games from old 0.199 games. Works with 32bit, 64bit Mame Binary or MameUI64
|
||||||
|
|
||||||
|
- Added Optional GUI to make modifying settings or setting up deviceguid a bit easier (read below for details, HAS TO BE IN SAME FOLDER WITH PLUGIN FILES & METROFRAMEWORK.dll)
|
||||||
|
|
||||||
|
|
||||||
|
***0.5 Changes***
|
||||||
|
|
||||||
|
- Removed spring effect from Mario Kart 1.10 as it had issues with pulling wheel to side and replaced with constant effect for steering. Added options to enable and disable and modify strength (Do not lower below 128 in ini!!)
|
||||||
|
|
||||||
|
- Added Dpad support for Road Fighters 3D input (read below for details)
|
||||||
|
|
||||||
|
- Added ForceShowDeviceGUIDMessageBox option in ini to force Device Name and Device GUID to show in messagebox popup for each device connected
|
||||||
|
|
||||||
|
- Added option to reverse rumble motors if motors rumbling in reverse to how you like it
|
||||||
|
|
||||||
|
|
||||||
|
***0.4 Changes***
|
||||||
|
|
||||||
|
- Modified Button Rumble plugin to allow 2 x controllers to rumble
|
||||||
|
(Plugin can be renamed to either dinput8.dll,dinput.dll,d3d9.dll,d3d11.dll,xinput1_3.dll,opengl32.dll or winmm.dll to hook application)
|
||||||
|
|
||||||
|
- Modified Machstorm plugin to allow modifying rumble strength and length if required on effects
|
||||||
|
|
||||||
|
- Modified Afterburner Climax plugin to allow modifying strength and length if required on effects
|
||||||
|
|
||||||
|
- Modified Pokken Tournament plugin to allow modifying strength and length if required on effects (ini contains HowtoRumbleEffect. 0 = both motors, 1 = left motor, 2 = right motor so you can customize to how it suits)
|
||||||
|
|
||||||
|
- Fixed bug on Pokken Tournament where rumble wouldn't work
|
||||||
|
|
||||||
|
- Added rumble support for Let's Go Island (ini contains HowtoRumbleEffect. 0 = both motors, 1 = left motor, 2 = right motor so you can customize to how it suits, supports multiple controllers for 2p)
|
||||||
|
|
||||||
|
- Added rumble support for Let's Go Island 3D (ini contains HowtoRumbleEffect. 0 = both motors, 1 = left motor, 2 = right motor so you can customize to how it suits, supports multiple controllers for 2p)
|
||||||
|
|
||||||
|
- Added FFB Support for San Francisco Rush and San Francisco Rush The Rock for mame 0.199 60fps custom hack version (http://forum.arcadecontrols.com/index.php?topic=158489.0)
|
||||||
|
|
||||||
|
|
||||||
|
***0.3 Changes***
|
||||||
|
|
||||||
|
- Added general button plugin to rumble controller when button pressed, modify length for how long in ini (Great for lightgun games!)
|
||||||
|
|
||||||
|
- Added options to Daytona Championship USA ini to enable or disable Exit Button, Menu Movement or Gear Changes (Teknoparrot version now has this all built in)
|
||||||
|
|
||||||
|
- Added FFB support for Nascar Racing on Demul (180428 version)
|
||||||
|
|
||||||
|
- Added FFB support for GTI Club Supermini Festa on Teknoparrot
|
||||||
|
|
||||||
|
- Added FFB support for Road Fighters 3D using spicetools, added option for input support for analog and buttons. Read bottom of this for details
|
||||||
|
|
||||||
|
- Fixed issue where Sega Racing Classic FFB wouldn't work while playing over network
|
||||||
|
|
||||||
|
- Renamed the log.txt to FFBlog.txt as certain games already created a log.txt which could cause issues
|
||||||
|
|
||||||
|
- Added Daytona USA Multiplayer AI Hack (up to 4 player so far) on M2 Emulator, enable in ini file to enable. While racing network, positions will include AI Car positions too.
|
||||||
|
|
||||||
|
- Added Daytona Force Panoramic Attract option on M2 Emulator to force the game to use panoramic attract mode on less then 4 players even
|
||||||
|
|
||||||
|
|
||||||
|
***0.2 Changes***
|
||||||
|
|
||||||
|
- Added support for California Speed, Cruis'n World, Cruis'n USA & Off Road Challenge on Mame 32 or 64bit Binary OR MameUI64 ONLY for Mame 0.199.
|
||||||
|
|
||||||
|
- Added support for Sega Rally Championship,Daytona USA,Indy 500,Sega Touring Car Championship,Over Rev & Super GT 24h on M2 Emulator 1.1a (just alternative to built in FFB)
|
||||||
|
(Disable FFB in Emulator.ini if you want to use FFB Plugin instead of M2 Emulator's built in FFB support. Set hardware type to STCC for OverRev & I/O board to A or B for Super GT 24h in test menu!! )
|
||||||
|
|
||||||
|
- Added support for Initial D4 Japan, Initial D5,Sonic & Sega All Stars Racing & Outrun 2 Special Tours Deluxe for Teknoparrot
|
||||||
|
|
||||||
|
- Added strength options in ini for most effects in Mario Kart 1.10. Wheels can only use MAX of 100, Controller can go higher
|
||||||
|
Multiplier option is if you want to raise the strength of Water and Drift effects, 200 would double the strength etc. Set to 100 by default
|
||||||
|
|
||||||
|
- Added option to certain games in ini to give a bit more strength to lower forces. FFBMode=0 is the standard and FFBMode=1 is the new mode
|
||||||
|
(BE WARNED ON CERTAIN WHEELS THIS COULD CAUSE OSCILLATION TO OCCUR)
|
||||||
|
|
||||||
|
- Added option to Daytona Championship USA ini to hide mouse cursor
|
||||||
|
|
||||||
|
- Added AlternativeFFB option to ini which is for wheels such as PWM2M2 or certain direct drive wheels etc which use constant effect incorrectly ingame.
|
||||||
|
eg Roll left and Roll Right doesn't work correctly, Enable Alternative FFB to modify this and added strength options for it
|
||||||
|
|
||||||
|
|
||||||
|
***0.1a Changes***
|
||||||
|
|
||||||
|
- Added support for San Francisco Rush, San Francisco Rush The Rock, San Francisco Rush 2049,
|
||||||
|
San Francisco Rush 2049 SE & Rave Racer on Mame 32 or 64bit Binary OR MameUI64 ONLY for Mame 0.199.
|
||||||
|
|
||||||
|
Please turn on Feedback steering in game settings on Rave Racer or you will not recieve FFB & I suggest you
|
||||||
|
adjust deadzone for your wheel in mame settings.
|
||||||
|
|
||||||
|
(This was added just for a little fun as no one really has done ffb on mame yet)
|
||||||
|
|
||||||
|
- Added Daytona Championship USA exit key (escape), Gear change added for Gears 1,2,3 & 4 or Sequential Gear Up/Down.
|
||||||
|
Change Button Number in ini if necessary (x360ce not necessary for gear change).
|
||||||
|
Make ShowButtonNumbersForSetup=1 if you want to have popup boxes to work out Button Layout. Press button to see box
|
||||||
|
Track selection menu & Name Entry has added control too now
|
||||||
|
|
||||||
|
|
||||||
|
- Modified Mario Kart DX 1.10 FFB adding a bunch of new effects and ini can now Enable or Disable Effects
|
||||||
|
- Will rumble when picking up coins
|
||||||
|
- Will rumble when picking up weapons
|
||||||
|
- Will rumble when using weapons
|
||||||
|
- Drift effect on rumble (stronger the more you turn)(rumble each way when turning etc)
|
||||||
|
- Boost effect on rumble
|
||||||
|
- Rumble when kart hits ground from jumps or flying
|
||||||
|
- Water effect on rumble (rumble each way when turning etc)
|
||||||
|
- Speed of kart taken into effect etc
|
||||||
|
|
||||||
|
***REQUIREMENTS***
|
||||||
|
|
||||||
|
- Requires Visual Runtime Files
|
||||||
|
|
||||||
|
- GUI Requires Visual Runtime 2015 (pretty sure its this lol) and has to be in same folder with metroframework.dll & SDL2.dll
|
||||||
|
|
||||||
|
***CREDITS***
|
||||||
|
|
||||||
|
- Reaver from Teknoparrot . Huge thanks to Reaver for supplying code necessary for some games & general force feedback,
|
||||||
|
extremely generous.
|
||||||
|
|
||||||
|
- Jackchen for his Daytona Championship USA FFB work at beginning of year.
|
||||||
|
|
||||||
|
- Howard Castro for help on game FFB code. Always helpful and a big reason this plugin was ever made
|
||||||
|
|
||||||
|
- Mame team
|
||||||
|
|
||||||
|
- Racer_S for making dinput8 blocker used on Road Fighters 3D
|
||||||
|
|
||||||
|
- SailorSat for finding the offsets etc required for Daytona USA Multiplayer AI hack
|
||||||
|
|
||||||
|
- Nuexzz for finding offset required for Daytona Panoramic Force Hack
|
||||||
|
|
||||||
|
- POOTERMAN for making logo on GUI
|
||||||
|
|
||||||
|
- Everyone who helps and gives back to this awesome scene. Thanks for everything!
|
||||||
|
|
||||||
|
|
||||||
|
***SUPPORTED GAMES***
|
||||||
|
|
||||||
|
-Afterburner Climax (Rumble only) [opengl32.dll into Teknoparrot folder, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder]
|
||||||
|
|
||||||
|
-Battle Gear 4 Tuned (Japan version v2.07) [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
-ChaseHQ 2 [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
-Daytona USA [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Daytona Championship USA [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Ford Racing [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Indy 500 [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Initial D4 [opengl32.dll into Teknoparrot folder, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder]
|
||||||
|
|
||||||
|
-Initial D4 Japan [opengl32.dll into Teknoparrot folder, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder]
|
||||||
|
|
||||||
|
-Initial D5 [opengl32.dll into Teknoparrot folder, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder]
|
||||||
|
|
||||||
|
-Initial D6 [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Initial D7 [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Initial D8 [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Machstorm (Rumble only) [xinput1_3.dll into game exe folder]
|
||||||
|
|
||||||
|
-Mario Kart GP DX (Version 1.00 & version 1.10) [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Pokken Tournament (Rumble only) [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Sega Touring Car Championship [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Sega Racing Classic [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Sega Rally Championship [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Sega Rally 3 [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Super GT 24h [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Sonic & Sega All Stars Racing [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
-Outrun 2 Special Tours Deluxe [opengl32.dll into Teknoparrot folder, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder]
|
||||||
|
|
||||||
|
-Over Rev [dinput8.dll into m2 emulator 1.1a folder]
|
||||||
|
|
||||||
|
-Wacky Races [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
-Wangan Midnight Maximum Tune 5 (Update 5) [d3d11.dll into game exe folder]
|
||||||
|
|
||||||
|
-San Francisco Rush, San Francisco Rush The Rock, San Francisco Rush 2049 & San Francisco Rush 2049 SE
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-Rave Racer [dinput8.dll into any mame 0.199 folder]
|
||||||
|
TURN ON FEEDBACK STEERING IN GAME SETTINGS OR YOU WILL NOT RECIEVE FORCE FEEDBACK!
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-California Speed
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-Cruis'n World
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-Cruis'n USA
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-Off Road Challenge
|
||||||
|
(will ONLY work on either Mame Binary 32 or 64 bit or MameUI64 for Mame version 0.199 or 0.206 [dinput8.dll into any mame 0.199 or mame 0.206 folder]
|
||||||
|
|
||||||
|
-GTI Club Supermini Festa [dinput8.dll into game exe folder]
|
||||||
|
|
||||||
|
-Road Fighters 3D [d3d9.dll & dinput8.dll(if using ffb plugin for inputs) into game exe folder]
|
||||||
|
|
||||||
|
-Nascar Racing [dinput8.dll into demul 180428 version folder]
|
||||||
|
|
||||||
|
-Let's Go Island [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
-Let's Go Island 3D [d3d9.dll into game exe folder]
|
||||||
|
|
||||||
|
|
||||||
|
***HOW TO USE***
|
||||||
|
|
||||||
|
Place the main dll file, SDL2.dll & FFBPlugin.ini into game folder for most games. For Teknoparrot Lindbergh
|
||||||
|
games place opengl32.dll, SDL22.dll into Teknoparrot folder inside Main Teknoparrot folder & FFBPlugin.ini into same folder as elf file for each game.
|
||||||
|
|
||||||
|
Elf file is like the lindbergh version of an exe eg the file you choose to load via teknoparrot
|
||||||
|
|
||||||
|
If using GUI, put FFBPluginGUI.exe & Metroframework.dll into same folder as FFBPlugin.ini
|
||||||
|
|
||||||
|
If you are using FFB Plugin on Teknoparrot instead of using Teknoparrot built in FFB, Please turn off Force Feedback in TeknoparrotUI. (Not necessary on latest TP Versions)
|
||||||
|
|
||||||
|
ini file contains settings to adjust for each game
|
||||||
|
|
||||||
|
GameId= **GameId for code to identify game, also has a test FFB mode,-1 for Constant test ,-2 for
|
||||||
|
Sine test, -3 for Friction test, -4 for Spring test, -5 for Heavy test or -6 for loose test**
|
||||||
|
|
||||||
|
MinForce= **Minimum FFB force with 0 being lowest value available**
|
||||||
|
|
||||||
|
MaxForce= **Maximum FFB force with 100 being highest value available**
|
||||||
|
|
||||||
|
DeviceGUID= **Set Device GUID to connect to specific wheel or controller**
|
||||||
|
|
||||||
|
EnableRumble= **Turn Off (0) if your wheel supports rumble effect. For controllers, turn on (1)**
|
||||||
|
|
||||||
|
Logging= **Turn On (1) to allow log.txt to be made to log plugin. Device GUID is given in here**
|
||||||
|
|
||||||
|
ResetFeedback= **When a command is set that contradicts a prior command, clear the prior command. Should stay as 1**
|
||||||
|
|
||||||
|
FeedbackLength= **Length of a feedback command**
|
||||||
|
|
||||||
|
DefaultCentering= **If a game does not specify its own Centering force then a default centering can be applied here.
|
||||||
|
If a game has any of its own such forces,these values will be overwritten immediately in-game. Use -1 to disable**
|
||||||
|
|
||||||
|
DefaultFriction= **If a game does not specify its own Friction force then a default friction can be applied here.
|
||||||
|
If a game has any of its own such forces,these values will be overwritten immediately in-game. Use -1 to disable**
|
||||||
|
|
||||||
|
BeepWhenHook= **Beep should occur if dll is hooked by executable when turned on (1)**
|
||||||
|
|
||||||
|
FFBMode= **This will raise strength of lower forces, potentially could cause oscillation to occur on certain games. Set 1 to turn on**
|
||||||
|
|
||||||
|
AlternativeFFB= **This is for certain wheels where roll effect does not work correctly normally (such as PWM2M2 or Thrustmaster 300rs etc). Set 1 to turn on **
|
||||||
|
|
||||||
|
Device2GUID= **Set Device 2 GUID to connect to secondary specific wheel or controller (buttons only)**
|
||||||
|
|
||||||
|
|
||||||
|
*** GUI SUPPORT ***
|
||||||
|
|
||||||
|
- REQUIRES visual runtime 2015,SDL2.dll & Metroframework.dll. SDL2.dll & Metroframework.dll are supplied in each plugin folder
|
||||||
|
|
||||||
|
- Is designed to be used in conjunction with FFBPlugin.ini files included with each plugin folder. Place all plugin files into game exe folder(unless Lindbergh, read 0.6a changes above)
|
||||||
|
|
||||||
|
- If FFBPlugin.ini exists, it will read the values and display values etc on game page. As soon as you adjust any value, it automatically writes to FFBPlugin.ini the new value
|
||||||
|
|
||||||
|
- If FFBPlugin.ini doesn't exist it will give you message saying so or if GameId number is missing from FFBPlugin.ini
|
||||||
|
|
||||||
|
- Input support will only work on the supported games, otherwise message will tell you it is unsupported for that games plugin
|
||||||
|
|
||||||
|
|
||||||
|
*** INPUT SUPPORT ***
|
||||||
|
|
||||||
|
To enable input on supported games, firstly setup GUID as normal and enable InputDeviceWheelEnable in ini (1 to turn on, 0 to turn off).
|
||||||
|
|
||||||
|
Ive pre-set the axis for Logitech G920 wheel however if this is incorrect I have added options
|
||||||
|
to change in FFBPlugin.ini.
|
||||||
|
|
||||||
|
- Added option for Device2GUID in ini for a 2nd device to include inputs (great for seperate usb shifter etc, add the button numbers to the device2 buttons in ini )
|
||||||
|
|
||||||
|
- Enable ShowButtonNumbersForSetup to give window popup to give button numbers for setup into FFBPlugin.ini
|
||||||
|
|
||||||
|
- Enable ShowAxisSetup to give window popup to give axis numbers for setup into FFBPlugin.ini
|
||||||
|
|
||||||
|
- You can enable ShowButtonNumbersForSetup & ShowAxisSetup at same time if you wish
|
||||||
|
|
||||||
|
- SteeringDeadzone to modify the steering deadzone for either wheel or controller.
|
||||||
|
(Recommend around 2 for wheel and 70 for controller, but feel free to play around for best setting)
|
||||||
|
|
||||||
|
- SequentialGears option will disable standard h pattern gear shift and use leverUp & leverDown to shift up and down gears easily
|
||||||
|
|
||||||
|
- Enable InputDeviceCombinedPedals if your wheel or controller uses combined axis, setup as InputDeviceWheelAcclAxis in ini
|
||||||
|
|
||||||
|
- Set DpadUp,DpadDown,DpadLeft & DpadRight = as any button name in ini eg DpadUp=StartButton and DpadUp will now do start button ingame. You can use Dpad and normal button at same time if you wish
|
||||||
|
|
||||||
|
After setting up Axis and Buttons then Disable ShowButtonNumbersForSetup & ShowAxisSetup if enabled and play!
|
||||||
|
|
||||||
|
|
||||||
|
*** TROUBLESHOOTING ***
|
||||||
|
|
||||||
|
OMG FFB DOESN'T WORK!!
|
||||||
|
|
||||||
|
1) Firstly copy files to where supported games section says
|
||||||
|
2) Run Game then exit after a few seconds
|
||||||
|
3) Check FFBlog.txt for device guid number
|
||||||
|
4) Copy this number to FFBPlugin.ini to DeviceGUID=
|
||||||
|
5) Disable logging in FFBPlugin.ini if you wish for no logging
|
||||||
|
6) Play Game
|
||||||
|
7) If still no FFB, ensure you have visual runtime files installed
|
||||||
|
|
||||||
|
INPUT HELP
|
||||||
|
1) Device does nothing ingame!! (enable InputDeviceWheelEnable)
|
||||||
|
2) Steering doesn't work (set up correct axis in ini)
|
||||||
|
3) Pedals don't work (set up correct axis in ini)
|
||||||
|
4) Pedals only work when not pressed (enable reverse axis)
|
||||||
|
5) Pedals need to be combined (enable combined pedals)
|
||||||
|
6) Buttons don't work (set up correct button numbers in ini)
|
||||||
|
7) Device2 doesn't work (set up correct button numbers in ini under Device2buttons)
|
||||||
|
|
||||||
|
Default Axis and Button Numbers to help with setup on certain controllers/wheels
|
||||||
|
|
||||||
|
For Xbox One & Xbox 360 Controller:
|
||||||
|
[Axis Numbers]
|
||||||
|
Left Stick X Axis = 0
|
||||||
|
Left Stick Y Axis = 1
|
||||||
|
Right Stick X Axis = 3
|
||||||
|
Right Stick Y Axis = 4
|
||||||
|
Left Trigger = 2
|
||||||
|
Right Trigger = 5
|
||||||
|
|
||||||
|
[Button Numbers]
|
||||||
|
A Button = 0
|
||||||
|
B Button = 1
|
||||||
|
X Button = 2
|
||||||
|
Y Button = 3
|
||||||
|
Left Shoulder Button = 4
|
||||||
|
Right Shoulder Button = 5
|
||||||
|
Back Button/View Button = 6
|
||||||
|
Start Button/Menu Button = 7
|
||||||
|
Left Stick Down Button = 8
|
||||||
|
Right Stick Down Button = 9
|
||||||
|
|
||||||
|
For Thrustmaster T300RS:
|
||||||
|
[Axis Numbers]
|
||||||
|
|
||||||
|
[If Seperate Axis]
|
||||||
|
Steering Axis = 0
|
||||||
|
Accl Axis = 2
|
||||||
|
Brake Axis = 1
|
||||||
|
|
||||||
|
[If Combined Axis]
|
||||||
|
Steering Axis = 0
|
||||||
|
Accl Axis = 1
|
||||||
|
Brake Axis = 1
|
||||||
|
|
||||||
|
[Button Numbers]
|
||||||
|
PS Button = 12
|
||||||
|
L2 Button = 9
|
||||||
|
R2 Button = 8
|
||||||
|
ST Button = 7
|
||||||
|
SE Button = 6
|
||||||
|
X Button = 5
|
||||||
|
[] Button = 3
|
||||||
|
() Button = 4
|
||||||
|
/\ Button = 2
|
||||||
|
Right Paddle = 1
|
||||||
|
Left Paddle = 0
|
78
Post-Build/build.js
Normal file
78
Post-Build/build.js
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
var ini = require('ini');
|
||||||
|
var fs = require('fs');
|
||||||
|
var myArgs = process.argv.slice(2) || [];
|
||||||
|
var filename = myArgs.length > 0 ? myArgs[0] : (__dirname + '\\FFBPlugin.ini');
|
||||||
|
var sourceDir = myArgs.length > 1 ? myArgs[1] : __dirname;
|
||||||
|
var outputDir = myArgs.length > 2 ? myArgs[2] : __dirname;
|
||||||
|
|
||||||
|
var o = ini.parse(fs.readFileSync(filename, 'ascii'));
|
||||||
|
// console.log(JSON.stringify(o) + "\r\n\r\n");
|
||||||
|
|
||||||
|
var getSettings = function() {
|
||||||
|
var settings = {};
|
||||||
|
Object.keys(o.Settings).forEach(function(k) {
|
||||||
|
settings[k] = o.Settings[k];
|
||||||
|
});
|
||||||
|
return settings;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fs.existsSync(outputDir + "\\dinput8.dll")) {
|
||||||
|
console.log("DINPUT8.DLL FOUND");
|
||||||
|
} else {
|
||||||
|
console.log("DINPUT8.DLL NOT FOUND!");
|
||||||
|
}
|
||||||
|
|
||||||
|
Object.keys(o).forEach(function(key) {
|
||||||
|
var output = getSettings();
|
||||||
|
var folderName = key;
|
||||||
|
if (key !== "Settings") {
|
||||||
|
var realOutput = Object.assign(output, o[key]);
|
||||||
|
// console.log(JSON.stringify(realOutput) + "\r\n\r\n");
|
||||||
|
if (!fs.existsSync(outputDir + '\\' + folderName)) {
|
||||||
|
fs.mkdirSync(outputDir + "\\" + folderName);
|
||||||
|
}
|
||||||
|
console.log("Exporting settings for " + folderName);
|
||||||
|
fs.writeFileSync(outputDir + "\\" + folderName + "\\FFBPlugin.ini",
|
||||||
|
"; " + "*".repeat((" *** FFB Settings for" + folderName + " ***").length) + "\r\n" +
|
||||||
|
"; *** FFB Settings for " + folderName + " ***\r\n" +
|
||||||
|
"; " + "*".repeat((" *** FFB Settings for" + folderName + " ***").length) + "\r\n" +
|
||||||
|
ini.stringify({ Settings: realOutput }).trim());
|
||||||
|
// try {
|
||||||
|
// fs.copyFileSync(sourceDir + "\\SDL2.dll", outputDir + "\\" + folderName + "\\SDL2.dll");
|
||||||
|
// fs.copyFileSync(sourceDir + "\\dinput8.dll", outputDir + "\\" + folderName + "\\dinput8.dll");
|
||||||
|
// } catch(e) {
|
||||||
|
// // oh well
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// var deleteIfExists = function(fn) {
|
||||||
|
// if (fs.existsSync(fn)) {
|
||||||
|
// fs.unlinkSync(fn);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// deleteIfExists(sourceDir + "\\dinput8.exp");
|
||||||
|
// deleteIfExists(sourceDir + "\\dinput8.lib");
|
||||||
|
// deleteIfExists(sourceDir + "\\dinput8.dll");
|
||||||
|
// deleteIfExists(sourceDir + "\\SDL2.dll");
|
||||||
|
// deleteIfExists(sourceDir + "\\FFBPlugin.ini");
|
||||||
|
|
||||||
|
// var deleteFolderRecursive = function(path) {
|
||||||
|
// if (fs.existsSync(path)) {
|
||||||
|
// fs.readdirSync(path).forEach(function(file, index){
|
||||||
|
// var curPath = path + "/" + file;
|
||||||
|
// if (fs.lstatSync(curPath).isDirectory()) { // recurse
|
||||||
|
// deleteFolderRecursive(curPath);
|
||||||
|
// } else { // delete file
|
||||||
|
// fs.unlinkSync(curPath);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// fs.rmdirSync(path);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (fs.existsSync(sourceDir + "DInput8Wrapper\\")) {
|
||||||
|
// console.log("would delete" + sourceDir + "DInput8Wrapper\\");
|
||||||
|
// deleteFolderRecursive(sourceDir + "\\DInput8Wrapper\\");
|
||||||
|
// }
|
5
Post-Build/copydlls.bat
Normal file
5
Post-Build/copydlls.bat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
cd %1 %2
|
||||||
|
for /D /r %%d in (.) do @xcopy *.dll "%%d\" /y
|
||||||
|
for /D /r %%d in (.) do @xcopy FFBPlugin.txt "%%d\" /y
|
||||||
|
del %1\*.dll
|
||||||
|
del %1\FFBPlugin.txt
|
15
Post-Build/node_modules/ini/LICENSE
generated
vendored
Normal file
15
Post-Build/node_modules/ini/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
The ISC License
|
||||||
|
|
||||||
|
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||||
|
|
||||||
|
Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
purpose with or without fee is hereby granted, provided that the above
|
||||||
|
copyright notice and this permission notice appear in all copies.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||||
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
102
Post-Build/node_modules/ini/README.md
generated
vendored
Normal file
102
Post-Build/node_modules/ini/README.md
generated
vendored
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
An ini format parser and serializer for node.
|
||||||
|
|
||||||
|
Sections are treated as nested objects. Items before the first
|
||||||
|
heading are saved on the object directly.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Consider an ini-file `config.ini` that looks like this:
|
||||||
|
|
||||||
|
; this comment is being ignored
|
||||||
|
scope = global
|
||||||
|
|
||||||
|
[database]
|
||||||
|
user = dbuser
|
||||||
|
password = dbpassword
|
||||||
|
database = use_this_database
|
||||||
|
|
||||||
|
[paths.default]
|
||||||
|
datadir = /var/lib/data
|
||||||
|
array[] = first value
|
||||||
|
array[] = second value
|
||||||
|
array[] = third value
|
||||||
|
|
||||||
|
You can read, manipulate and write the ini-file like so:
|
||||||
|
|
||||||
|
var fs = require('fs')
|
||||||
|
, ini = require('ini')
|
||||||
|
|
||||||
|
var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))
|
||||||
|
|
||||||
|
config.scope = 'local'
|
||||||
|
config.database.database = 'use_another_database'
|
||||||
|
config.paths.default.tmpdir = '/tmp'
|
||||||
|
delete config.paths.default.datadir
|
||||||
|
config.paths.default.array.push('fourth value')
|
||||||
|
|
||||||
|
fs.writeFileSync('./config_modified.ini', ini.stringify(config, { section: 'section' }))
|
||||||
|
|
||||||
|
This will result in a file called `config_modified.ini` being written
|
||||||
|
to the filesystem with the following content:
|
||||||
|
|
||||||
|
[section]
|
||||||
|
scope=local
|
||||||
|
[section.database]
|
||||||
|
user=dbuser
|
||||||
|
password=dbpassword
|
||||||
|
database=use_another_database
|
||||||
|
[section.paths.default]
|
||||||
|
tmpdir=/tmp
|
||||||
|
array[]=first value
|
||||||
|
array[]=second value
|
||||||
|
array[]=third value
|
||||||
|
array[]=fourth value
|
||||||
|
|
||||||
|
|
||||||
|
## API
|
||||||
|
|
||||||
|
### decode(inistring)
|
||||||
|
|
||||||
|
Decode the ini-style formatted `inistring` into a nested object.
|
||||||
|
|
||||||
|
### parse(inistring)
|
||||||
|
|
||||||
|
Alias for `decode(inistring)`
|
||||||
|
|
||||||
|
### encode(object, [options])
|
||||||
|
|
||||||
|
Encode the object `object` into an ini-style formatted string. If the
|
||||||
|
optional parameter `section` is given, then all top-level properties
|
||||||
|
of the object are put into this section and the `section`-string is
|
||||||
|
prepended to all sub-sections, see the usage example above.
|
||||||
|
|
||||||
|
The `options` object may contain the following:
|
||||||
|
|
||||||
|
* `section` A string which will be the first `section` in the encoded
|
||||||
|
ini data. Defaults to none.
|
||||||
|
* `whitespace` Boolean to specify whether to put whitespace around the
|
||||||
|
`=` character. By default, whitespace is omitted, to be friendly to
|
||||||
|
some persnickety old parsers that don't tolerate it well. But some
|
||||||
|
find that it's more human-readable and pretty with the whitespace.
|
||||||
|
|
||||||
|
For backwards compatibility reasons, if a `string` options is passed
|
||||||
|
in, then it is assumed to be the `section` value.
|
||||||
|
|
||||||
|
### stringify(object, [options])
|
||||||
|
|
||||||
|
Alias for `encode(object, [options])`
|
||||||
|
|
||||||
|
### safe(val)
|
||||||
|
|
||||||
|
Escapes the string `val` such that it is safe to be used as a key or
|
||||||
|
value in an ini-file. Basically escapes quotes. For example
|
||||||
|
|
||||||
|
ini.safe('"unsafe string"')
|
||||||
|
|
||||||
|
would result in
|
||||||
|
|
||||||
|
"\"unsafe string\""
|
||||||
|
|
||||||
|
### unsafe(val)
|
||||||
|
|
||||||
|
Unescapes the string `val`
|
194
Post-Build/node_modules/ini/ini.js
generated
vendored
Normal file
194
Post-Build/node_modules/ini/ini.js
generated
vendored
Normal file
@ -0,0 +1,194 @@
|
|||||||
|
exports.parse = exports.decode = decode
|
||||||
|
|
||||||
|
exports.stringify = exports.encode = encode
|
||||||
|
|
||||||
|
exports.safe = safe
|
||||||
|
exports.unsafe = unsafe
|
||||||
|
|
||||||
|
var eol = typeof process !== 'undefined' &&
|
||||||
|
process.platform === 'win32' ? '\r\n' : '\n'
|
||||||
|
|
||||||
|
function encode (obj, opt) {
|
||||||
|
var children = []
|
||||||
|
var out = ''
|
||||||
|
|
||||||
|
if (typeof opt === 'string') {
|
||||||
|
opt = {
|
||||||
|
section: opt,
|
||||||
|
whitespace: false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
opt = opt || {}
|
||||||
|
opt.whitespace = opt.whitespace === true
|
||||||
|
}
|
||||||
|
|
||||||
|
var separator = opt.whitespace ? ' = ' : '='
|
||||||
|
|
||||||
|
Object.keys(obj).forEach(function (k, _, __) {
|
||||||
|
var val = obj[k]
|
||||||
|
if (val && Array.isArray(val)) {
|
||||||
|
val.forEach(function (item) {
|
||||||
|
out += safe(k + '[]') + separator + safe(item) + '\n'
|
||||||
|
})
|
||||||
|
} else if (val && typeof val === 'object') {
|
||||||
|
children.push(k)
|
||||||
|
} else {
|
||||||
|
out += safe(k) + separator + safe(val) + eol
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (opt.section && out.length) {
|
||||||
|
out = '[' + safe(opt.section) + ']' + eol + out
|
||||||
|
}
|
||||||
|
|
||||||
|
children.forEach(function (k, _, __) {
|
||||||
|
var nk = dotSplit(k).join('\\.')
|
||||||
|
var section = (opt.section ? opt.section + '.' : '') + nk
|
||||||
|
var child = encode(obj[k], {
|
||||||
|
section: section,
|
||||||
|
whitespace: opt.whitespace
|
||||||
|
})
|
||||||
|
if (out.length && child.length) {
|
||||||
|
out += eol
|
||||||
|
}
|
||||||
|
out += child
|
||||||
|
})
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
function dotSplit (str) {
|
||||||
|
return str.replace(/\1/g, '\u0002LITERAL\\1LITERAL\u0002')
|
||||||
|
.replace(/\\\./g, '\u0001')
|
||||||
|
.split(/\./).map(function (part) {
|
||||||
|
return part.replace(/\1/g, '\\.')
|
||||||
|
.replace(/\2LITERAL\\1LITERAL\2/g, '\u0001')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function decode (str) {
|
||||||
|
var out = {}
|
||||||
|
var p = out
|
||||||
|
var section = null
|
||||||
|
// section |key = value
|
||||||
|
var re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i
|
||||||
|
var lines = str.split(/[\r\n]+/g)
|
||||||
|
|
||||||
|
lines.forEach(function (line, _, __) {
|
||||||
|
if (!line || line.match(/^\s*[;#]/)) return
|
||||||
|
var match = line.match(re)
|
||||||
|
if (!match) return
|
||||||
|
if (match[1] !== undefined) {
|
||||||
|
section = unsafe(match[1])
|
||||||
|
p = out[section] = out[section] || {}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var key = unsafe(match[2])
|
||||||
|
var value = match[3] ? unsafe(match[4]) : true
|
||||||
|
switch (value) {
|
||||||
|
case 'true':
|
||||||
|
case 'false':
|
||||||
|
case 'null': value = JSON.parse(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert keys with '[]' suffix to an array
|
||||||
|
if (key.length > 2 && key.slice(-2) === '[]') {
|
||||||
|
key = key.substring(0, key.length - 2)
|
||||||
|
if (!p[key]) {
|
||||||
|
p[key] = []
|
||||||
|
} else if (!Array.isArray(p[key])) {
|
||||||
|
p[key] = [p[key]]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// safeguard against resetting a previously defined
|
||||||
|
// array by accidentally forgetting the brackets
|
||||||
|
if (Array.isArray(p[key])) {
|
||||||
|
p[key].push(value)
|
||||||
|
} else {
|
||||||
|
p[key] = value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}}
|
||||||
|
// use a filter to return the keys that have to be deleted.
|
||||||
|
Object.keys(out).filter(function (k, _, __) {
|
||||||
|
if (!out[k] ||
|
||||||
|
typeof out[k] !== 'object' ||
|
||||||
|
Array.isArray(out[k])) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// see if the parent section is also an object.
|
||||||
|
// if so, add it to that, and mark this one for deletion
|
||||||
|
var parts = dotSplit(k)
|
||||||
|
var p = out
|
||||||
|
var l = parts.pop()
|
||||||
|
var nl = l.replace(/\\\./g, '.')
|
||||||
|
parts.forEach(function (part, _, __) {
|
||||||
|
if (!p[part] || typeof p[part] !== 'object') p[part] = {}
|
||||||
|
p = p[part]
|
||||||
|
})
|
||||||
|
if (p === out && nl === l) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
p[nl] = out[k]
|
||||||
|
return true
|
||||||
|
}).forEach(function (del, _, __) {
|
||||||
|
delete out[del]
|
||||||
|
})
|
||||||
|
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
function isQuoted (val) {
|
||||||
|
return (val.charAt(0) === '"' && val.slice(-1) === '"') ||
|
||||||
|
(val.charAt(0) === "'" && val.slice(-1) === "'")
|
||||||
|
}
|
||||||
|
|
||||||
|
function safe (val) {
|
||||||
|
return (typeof val !== 'string' ||
|
||||||
|
val.match(/[=\r\n]/) ||
|
||||||
|
val.match(/^\[/) ||
|
||||||
|
(val.length > 1 &&
|
||||||
|
isQuoted(val)) ||
|
||||||
|
val !== val.trim())
|
||||||
|
? JSON.stringify(val)
|
||||||
|
: val.replace(/;/g, '\\;').replace(/#/g, '\\#')
|
||||||
|
}
|
||||||
|
|
||||||
|
function unsafe (val, doUnesc) {
|
||||||
|
val = (val || '').trim()
|
||||||
|
if (isQuoted(val)) {
|
||||||
|
// remove the single quotes before calling JSON.parse
|
||||||
|
if (val.charAt(0) === "'") {
|
||||||
|
val = val.substr(1, val.length - 2)
|
||||||
|
}
|
||||||
|
try { val = JSON.parse(val) } catch (_) {}
|
||||||
|
} else {
|
||||||
|
// walk the val to find the first not-escaped ; character
|
||||||
|
var esc = false
|
||||||
|
var unesc = ''
|
||||||
|
for (var i = 0, l = val.length; i < l; i++) {
|
||||||
|
var c = val.charAt(i)
|
||||||
|
if (esc) {
|
||||||
|
if ('\\;#'.indexOf(c) !== -1) {
|
||||||
|
unesc += c
|
||||||
|
} else {
|
||||||
|
unesc += '\\' + c
|
||||||
|
}
|
||||||
|
esc = false
|
||||||
|
} else if (';#'.indexOf(c) !== -1) {
|
||||||
|
break
|
||||||
|
} else if (c === '\\') {
|
||||||
|
esc = true
|
||||||
|
} else {
|
||||||
|
unesc += c
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (esc) {
|
||||||
|
unesc += '\\'
|
||||||
|
}
|
||||||
|
return unesc.trim()
|
||||||
|
}
|
||||||
|
return val
|
||||||
|
}
|
66
Post-Build/node_modules/ini/package.json
generated
vendored
Normal file
66
Post-Build/node_modules/ini/package.json
generated
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
"_args": [
|
||||||
|
[
|
||||||
|
"ini@1.3.5",
|
||||||
|
"C:\\Users\\booms\\Downloads\\pragun89-ffbplugin-9321a2abeb0d-fixedX64\\Post-Build"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"_from": "ini@1.3.5",
|
||||||
|
"_id": "ini@1.3.5",
|
||||||
|
"_inBundle": false,
|
||||||
|
"_integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||||
|
"_location": "/ini",
|
||||||
|
"_phantomChildren": {},
|
||||||
|
"_requested": {
|
||||||
|
"type": "version",
|
||||||
|
"registry": true,
|
||||||
|
"raw": "ini@1.3.5",
|
||||||
|
"name": "ini",
|
||||||
|
"escapedName": "ini",
|
||||||
|
"rawSpec": "1.3.5",
|
||||||
|
"saveSpec": null,
|
||||||
|
"fetchSpec": "1.3.5"
|
||||||
|
},
|
||||||
|
"_requiredBy": [
|
||||||
|
"/"
|
||||||
|
],
|
||||||
|
"_resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||||
|
"_spec": "1.3.5",
|
||||||
|
"_where": "C:\\Users\\booms\\Downloads\\pragun89-ffbplugin-9321a2abeb0d-fixedX64\\Post-Build",
|
||||||
|
"author": {
|
||||||
|
"name": "Isaac Z. Schlueter",
|
||||||
|
"email": "i@izs.me",
|
||||||
|
"url": "http://blog.izs.me/"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/isaacs/ini/issues"
|
||||||
|
},
|
||||||
|
"dependencies": {},
|
||||||
|
"description": "An ini encoder/decoder for node",
|
||||||
|
"devDependencies": {
|
||||||
|
"standard": "^10.0.3",
|
||||||
|
"tap": "^10.7.3 || 11"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "*"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"ini.js"
|
||||||
|
],
|
||||||
|
"homepage": "https://github.com/isaacs/ini#readme",
|
||||||
|
"license": "ISC",
|
||||||
|
"main": "ini.js",
|
||||||
|
"name": "ini",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/isaacs/ini.git"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"postpublish": "git push origin --all; git push origin --tags",
|
||||||
|
"postversion": "npm publish",
|
||||||
|
"pretest": "standard ini.js",
|
||||||
|
"preversion": "npm test",
|
||||||
|
"test": "tap test/*.js --100 -J"
|
||||||
|
},
|
||||||
|
"version": "1.3.5"
|
||||||
|
}
|
13
Post-Build/package-lock.json
generated
Normal file
13
Post-Build/package-lock.json
generated
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "ffb-build",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"ini": {
|
||||||
|
"version": "1.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||||
|
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
14
Post-Build/package.json
Normal file
14
Post-Build/package.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "ffb-build",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "Post-build process operations for ffbplugin",
|
||||||
|
"main": "build.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "spazzy",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"ini": "^1.3.5"
|
||||||
|
}
|
||||||
|
}
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# FFBPlugin
|
||||||
|
|
||||||
|
C++ plugin for adding force feedback support to arcade games.
|
658
dinput8.def
Normal file
658
dinput8.def
Normal file
@ -0,0 +1,658 @@
|
|||||||
|
LIBRARY dinput8
|
||||||
|
EXPORTS
|
||||||
|
DllMain @1
|
||||||
|
XInputGetState = _XInputGetState @2
|
||||||
|
XInputSetState = _XInputSetState @3
|
||||||
|
XInputGetCapabilities = _XInputGetCapabilities @4
|
||||||
|
XInputEnable = _XInputEnable @5
|
||||||
|
XInputGetDSoundAudioDeviceGuids = _XInputGetDSoundAudioDeviceGuids @6
|
||||||
|
XInputGetBatteryInformation = _XInputGetBatteryInformation @7
|
||||||
|
XInputGetKeystroke = _XInputGetKeystroke @8
|
||||||
|
XInputGetStateEx = _XInputGetStateEx @100 NONAME
|
||||||
|
XInputWaitForGuideButton = _XInputWaitForGuideButton @101 NONAME
|
||||||
|
XInputCancelGuideButtonWait = _XInputCancelGuideButtonWait @102 NONAME
|
||||||
|
XInputPowerOffController = _XInputPowerOffController @103 NONAME
|
||||||
|
|
||||||
|
DirectInput8Create=DirectInputDirectInput8Create
|
||||||
|
DllRegisterServer=DirectInputDllRegisterServer PRIVATE
|
||||||
|
DllUnregisterServer=DirectInputDllUnregisterServer PRIVATE
|
||||||
|
DllCanUnloadNow=DirectInputDllCanUnloadNow PRIVATE
|
||||||
|
DllGetClassObject=DirectInputDllGetClassObject PRIVATE
|
||||||
|
GetdfDIJoystick=DirectInputGetdfDIJoystick PRIVATE
|
||||||
|
|
||||||
|
DirectInputCreateA=DirectInputDirectInputCreateA
|
||||||
|
DirectInputCreateW=DirectInputDirectInputCreateW
|
||||||
|
DirectInputCreateEx=DirectInputDirectInputCreateEx
|
||||||
|
|
||||||
|
Direct3DShaderValidatorCreate9 = _Direct3DShaderValidatorCreate9 @19
|
||||||
|
PSGPError = _PSGPError @20
|
||||||
|
PSGPSampleTexture = _PSGPSampleTexture @21
|
||||||
|
D3DPERF_BeginEvent = _D3DPERF_BeginEvent @22
|
||||||
|
D3DPERF_EndEvent = _D3DPERF_EndEvent @23
|
||||||
|
D3DPERF_GetStatus = _D3DPERF_GetStatus @24
|
||||||
|
D3DPERF_QueryRepeatFrame = _D3DPERF_QueryRepeatFrame @25
|
||||||
|
D3DPERF_SetMarker = _D3DPERF_SetMarker @26
|
||||||
|
D3DPERF_SetOptions = _D3DPERF_SetOptions @27
|
||||||
|
D3DPERF_SetRegion = _D3DPERF_SetRegion @28
|
||||||
|
DebugSetLevel = _DebugSetLevel @29
|
||||||
|
DebugSetMute = _DebugSetMute @30
|
||||||
|
Direct3D9EnableMaximizedWindowedModeShim = _Direct3D9EnableMaximizedWindowedModeShim @31
|
||||||
|
Direct3DCreate9 = _Direct3DCreate9 @32
|
||||||
|
Direct3DCreate9Ex = _Direct3DCreate9Ex @33
|
||||||
|
|
||||||
|
D3D11CreateDeviceForD3D12 = _D3D11CreateDeviceForD3D12
|
||||||
|
D3DKMTCloseAdapter = _D3DKMTCloseAdapter
|
||||||
|
D3DKMTDestroyAllocation = _D3DKMTDestroyAllocation
|
||||||
|
D3DKMTDestroyContext = _D3DKMTDestroyContext
|
||||||
|
D3DKMTDestroyDevice = _D3DKMTDestroyDevice
|
||||||
|
D3DKMTDestroySynchronizationObject = _D3DKMTDestroySynchronizationObject
|
||||||
|
D3DKMTPresent = _D3DKMTPresent
|
||||||
|
D3DKMTQueryAdapterInfo = _D3DKMTQueryAdapterInfo
|
||||||
|
D3DKMTSetDisplayPrivateDriverFormat = _D3DKMTSetDisplayPrivateDriverFormat
|
||||||
|
D3DKMTSignalSynchronizationObject = _D3DKMTSignalSynchronizationObject
|
||||||
|
D3DKMTUnlock = _D3DKMTUnlock
|
||||||
|
D3DKMTWaitForSynchronizationObject = _D3DKMTWaitForSynchronizationObject
|
||||||
|
EnableFeatureLevelUpgrade = _EnableFeatureLevelUpgrade
|
||||||
|
OpenAdapter10 = _OpenAdapter10
|
||||||
|
OpenAdapter10_2 = _OpenAdapter10_2
|
||||||
|
CreateDirect3D11DeviceFromDXGIDevice = _CreateDirect3D11DeviceFromDXGIDevice
|
||||||
|
CreateDirect3D11SurfaceFromDXGISurface = _CreateDirect3D11SurfaceFromDXGISurface
|
||||||
|
D3D11CoreCreateDevice = _D3D11CoreCreateDevice
|
||||||
|
D3D11CoreCreateLayeredDevice = _D3D11CoreCreateLayeredDevice
|
||||||
|
D3D11CoreGetLayeredDeviceSize = _D3D11CoreGetLayeredDeviceSize
|
||||||
|
D3D11CoreRegisterLayers = _D3D11CoreRegisterLayers
|
||||||
|
D3D11CreateDevice = _D3D11CreateDevice
|
||||||
|
D3D11CreateDeviceAndSwapChain = _D3D11CreateDeviceAndSwapChain
|
||||||
|
D3D11On12CreateDevice = _D3D11On12CreateDevice
|
||||||
|
D3DKMTCreateAllocation = _D3DKMTCreateAllocation
|
||||||
|
D3DKMTCreateContext = _D3DKMTCreateContext
|
||||||
|
D3DKMTCreateDevice = _D3DKMTCreateDevice
|
||||||
|
D3DKMTCreateSynchronizationObject = _D3DKMTCreateSynchronizationObject
|
||||||
|
D3DKMTEscape = _D3DKMTEscape
|
||||||
|
D3DKMTGetContextSchedulingPriority = _D3DKMTGetContextSchedulingPriority
|
||||||
|
D3DKMTGetDeviceState = _D3DKMTGetDeviceState
|
||||||
|
D3DKMTGetDisplayModeList = _D3DKMTGetDisplayModeList
|
||||||
|
D3DKMTGetMultisampleMethodList = _D3DKMTGetMultisampleMethodList
|
||||||
|
D3DKMTGetRuntimeData = _D3DKMTGetRuntimeData
|
||||||
|
D3DKMTGetSharedPrimaryHandle = _D3DKMTGetSharedPrimaryHandle
|
||||||
|
D3DKMTLock = _D3DKMTLock
|
||||||
|
D3DKMTOpenAdapterFromHdc = _D3DKMTOpenAdapterFromHdc
|
||||||
|
D3DKMTOpenResource = _D3DKMTOpenResource
|
||||||
|
D3DKMTQueryAllocationResidency = _D3DKMTQueryAllocationResidency
|
||||||
|
D3DKMTQueryResourceInfo = _D3DKMTQueryResourceInfo
|
||||||
|
D3DKMTRender = _D3DKMTRender
|
||||||
|
D3DKMTSetAllocationPriority = _D3DKMTSetAllocationPriority
|
||||||
|
D3DKMTSetContextSchedulingPriority = _D3DKMTSetContextSchedulingPriority
|
||||||
|
D3DKMTSetDisplayMode = _D3DKMTSetDisplayMode
|
||||||
|
D3DKMTSetGammaRamp = _D3DKMTSetGammaRamp
|
||||||
|
D3DKMTSetVidPnSourceOwner = _D3DKMTSetVidPnSourceOwner
|
||||||
|
D3DKMTWaitForVerticalBlankEvent = _D3DKMTWaitForVerticalBlankEvent
|
||||||
|
D3DPerformance_BeginEvent = _D3DPerformance_BeginEvent
|
||||||
|
D3DPerformance_EndEvent = _D3DPerformance_EndEvent
|
||||||
|
D3DPerformance_GetStatus = _D3DPerformance_GetStatus
|
||||||
|
D3DPerformance_SetMarker = _D3DPerformance_SetMarker
|
||||||
|
|
||||||
|
wglUseFontOutlinesA = _wglUseFontOutlinesA
|
||||||
|
wglUseFontOutlinesW = _wglUseFontOutlinesW
|
||||||
|
wglDescribeLayerPlane = _wglDescribeLayerPlane
|
||||||
|
wglSetLayerPaletteEntries = _wglSetLayerPaletteEntries
|
||||||
|
wglGetLayerPaletteEntries = _wglGetLayerPaletteEntries
|
||||||
|
wglRealizeLayerPalette = _wglRealizeLayerPalette
|
||||||
|
wglSwapLayerBuffers = _wglSwapLayerBuffers
|
||||||
|
wglMakeCurrent = _wglMakeCurrent
|
||||||
|
GlmfInitPlayback = _GlmfInitPlayback
|
||||||
|
GlmfBeginGlsBlock = _GlmfBeginGlsBlock
|
||||||
|
GlmfPlayGlsRecord = _GlmfPlayGlsRecord
|
||||||
|
GlmfEndGlsBlock = _GlmfEndGlsBlock
|
||||||
|
GlmfEndPlayback = _GlmfEndPlayback
|
||||||
|
GlmfCloseMetaFile = _GlmfCloseMetaFile
|
||||||
|
wglSwapMultipleBuffers = _wglSwapMultipleBuffers
|
||||||
|
wglCreateLayerContext = _wglCreateLayerContext
|
||||||
|
wglCreateContext = _wglCreateContext
|
||||||
|
wglDeleteContext = _wglDeleteContext
|
||||||
|
wglGetCurrentContext = _wglGetCurrentContext
|
||||||
|
wglGetCurrentDC = _wglGetCurrentDC
|
||||||
|
wglUseFontBitmapsA = _wglUseFontBitmapsA
|
||||||
|
wglUseFontBitmapsW = _wglUseFontBitmapsW
|
||||||
|
wglShareLists = _wglShareLists
|
||||||
|
wglGetDefaultProcAddress = _wglGetDefaultProcAddress
|
||||||
|
wglGetProcAddress = _wglGetProcAddress
|
||||||
|
wglCopyContext = _wglCopyContext
|
||||||
|
glDebugEntry = _glDebugEntry
|
||||||
|
wglGetPixelFormat = _wglGetPixelFormat
|
||||||
|
wglSetPixelFormat = _wglSetPixelFormat
|
||||||
|
wglChoosePixelFormat = _wglChoosePixelFormat
|
||||||
|
wglDescribePixelFormat = _wglDescribePixelFormat
|
||||||
|
wglSwapBuffers = _wglSwapBuffers
|
||||||
|
glCallList = _glCallList
|
||||||
|
glCallLists = _glCallLists
|
||||||
|
glBegin = _glBegin
|
||||||
|
glColor3b = _glColor3b
|
||||||
|
glColor3bv = _glColor3bv
|
||||||
|
glColor3d = _glColor3d
|
||||||
|
glColor3dv = _glColor3dv
|
||||||
|
glColor3f = _glColor3f
|
||||||
|
glColor3fv = _glColor3fv
|
||||||
|
glColor3i = _glColor3i
|
||||||
|
glColor3iv = _glColor3iv
|
||||||
|
glColor3s = _glColor3s
|
||||||
|
glColor3sv = _glColor3sv
|
||||||
|
glColor3ub = _glColor3ub
|
||||||
|
glColor3ubv = _glColor3ubv
|
||||||
|
glColor3ui = _glColor3ui
|
||||||
|
glColor3uiv = _glColor3uiv
|
||||||
|
glColor3us = _glColor3us
|
||||||
|
glColor3usv = _glColor3usv
|
||||||
|
glColor4b = _glColor4b
|
||||||
|
glColor4bv = _glColor4bv
|
||||||
|
glColor4d = _glColor4d
|
||||||
|
glColor4dv = _glColor4dv
|
||||||
|
glColor4f = _glColor4f
|
||||||
|
glColor4fv = _glColor4fv
|
||||||
|
glColor4i = _glColor4i
|
||||||
|
glColor4iv = _glColor4iv
|
||||||
|
glColor4s = _glColor4s
|
||||||
|
glColor4sv = _glColor4sv
|
||||||
|
glColor4ub = _glColor4ub
|
||||||
|
glColor4ubv = _glColor4ubv
|
||||||
|
glColor4ui = _glColor4ui
|
||||||
|
glColor4uiv = _glColor4uiv
|
||||||
|
glColor4us = _glColor4us
|
||||||
|
glColor4usv = _glColor4usv
|
||||||
|
glEdgeFlag = _glEdgeFlag
|
||||||
|
glEdgeFlagv = _glEdgeFlagv
|
||||||
|
glEnd = _glEnd
|
||||||
|
glIndexd = _glIndexd
|
||||||
|
glIndexdv = _glIndexdv
|
||||||
|
glIndexf = _glIndexf
|
||||||
|
glIndexfv = _glIndexfv
|
||||||
|
glIndexi = _glIndexi
|
||||||
|
glIndexiv = _glIndexiv
|
||||||
|
glIndexs = _glIndexs
|
||||||
|
glIndexsv = _glIndexsv
|
||||||
|
glNormal3b = _glNormal3b
|
||||||
|
glNormal3bv = _glNormal3bv
|
||||||
|
glNormal3d = _glNormal3d
|
||||||
|
glNormal3dv = _glNormal3dv
|
||||||
|
glNormal3f = _glNormal3f
|
||||||
|
glNormal3fv = _glNormal3fv
|
||||||
|
glNormal3i = _glNormal3i
|
||||||
|
glNormal3iv = _glNormal3iv
|
||||||
|
glNormal3s = _glNormal3s
|
||||||
|
glNormal3sv = _glNormal3sv
|
||||||
|
glTexCoord1d = _glTexCoord1d
|
||||||
|
glTexCoord1dv = _glTexCoord1dv
|
||||||
|
glTexCoord1f = _glTexCoord1f
|
||||||
|
glTexCoord1fv = _glTexCoord1fv
|
||||||
|
glTexCoord1i = _glTexCoord1i
|
||||||
|
glTexCoord1iv = _glTexCoord1iv
|
||||||
|
glTexCoord1s = _glTexCoord1s
|
||||||
|
glTexCoord1sv = _glTexCoord1sv
|
||||||
|
glTexCoord2d = _glTexCoord2d
|
||||||
|
glTexCoord2dv = _glTexCoord2dv
|
||||||
|
glTexCoord2f = _glTexCoord2f
|
||||||
|
glTexCoord2fv = _glTexCoord2fv
|
||||||
|
glTexCoord2i = _glTexCoord2i
|
||||||
|
glTexCoord2iv = _glTexCoord2iv
|
||||||
|
glTexCoord2s = _glTexCoord2s
|
||||||
|
glTexCoord2sv = _glTexCoord2sv
|
||||||
|
glTexCoord3d = _glTexCoord3d
|
||||||
|
glTexCoord3dv = _glTexCoord3dv
|
||||||
|
glTexCoord3f = _glTexCoord3f
|
||||||
|
glTexCoord3fv = _glTexCoord3fv
|
||||||
|
glTexCoord3i = _glTexCoord3i
|
||||||
|
glTexCoord3iv = _glTexCoord3iv
|
||||||
|
glTexCoord3s = _glTexCoord3s
|
||||||
|
glTexCoord3sv = _glTexCoord3sv
|
||||||
|
glTexCoord4d = _glTexCoord4d
|
||||||
|
glTexCoord4dv = _glTexCoord4dv
|
||||||
|
glTexCoord4f = _glTexCoord4f
|
||||||
|
glTexCoord4fv = _glTexCoord4fv
|
||||||
|
glTexCoord4i = _glTexCoord4i
|
||||||
|
glTexCoord4iv = _glTexCoord4iv
|
||||||
|
glTexCoord4s = _glTexCoord4s
|
||||||
|
glTexCoord4sv = _glTexCoord4sv
|
||||||
|
glVertex2d = _glVertex2d
|
||||||
|
glVertex2dv = _glVertex2dv
|
||||||
|
glVertex2f = _glVertex2f
|
||||||
|
glVertex2fv = _glVertex2fv
|
||||||
|
glVertex2i = _glVertex2i
|
||||||
|
glVertex2iv = _glVertex2iv
|
||||||
|
glVertex2s = _glVertex2s
|
||||||
|
glVertex2sv = _glVertex2sv
|
||||||
|
glVertex3d = _glVertex3d
|
||||||
|
glVertex3dv = _glVertex3dv
|
||||||
|
glVertex3f = _glVertex3f
|
||||||
|
glVertex3fv = _glVertex3fv
|
||||||
|
glVertex3i = _glVertex3i
|
||||||
|
glVertex3iv = _glVertex3iv
|
||||||
|
glVertex3s = _glVertex3s
|
||||||
|
glVertex3sv = _glVertex3sv
|
||||||
|
glVertex4d = _glVertex4d
|
||||||
|
glVertex4dv = _glVertex4dv
|
||||||
|
glVertex4f = _glVertex4f
|
||||||
|
glVertex4fv = _glVertex4fv
|
||||||
|
glVertex4i = _glVertex4i
|
||||||
|
glVertex4iv = _glVertex4iv
|
||||||
|
glVertex4s = _glVertex4s
|
||||||
|
glVertex4sv = _glVertex4sv
|
||||||
|
glMaterialf = _glMaterialf
|
||||||
|
glMaterialfv = _glMaterialfv
|
||||||
|
glMateriali = _glMateriali
|
||||||
|
glMaterialiv = _glMaterialiv
|
||||||
|
glDisable = _glDisable
|
||||||
|
glEnable = _glEnable
|
||||||
|
glPopAttrib = _glPopAttrib
|
||||||
|
glPushAttrib = _glPushAttrib
|
||||||
|
glEvalCoord1d = _glEvalCoord1d
|
||||||
|
glEvalCoord1dv = _glEvalCoord1dv
|
||||||
|
glEvalCoord1f = _glEvalCoord1f
|
||||||
|
glEvalCoord1fv = _glEvalCoord1fv
|
||||||
|
glEvalCoord2d = _glEvalCoord2d
|
||||||
|
glEvalCoord2dv = _glEvalCoord2dv
|
||||||
|
glEvalCoord2f = _glEvalCoord2f
|
||||||
|
glEvalCoord2fv = _glEvalCoord2fv
|
||||||
|
glEvalPoint1 = _glEvalPoint1
|
||||||
|
glEvalPoint2 = _glEvalPoint2
|
||||||
|
glLoadIdentity = _glLoadIdentity
|
||||||
|
glLoadMatrixf = _glLoadMatrixf
|
||||||
|
glLoadMatrixd = _glLoadMatrixd
|
||||||
|
glMatrixMode = _glMatrixMode
|
||||||
|
glMultMatrixf = _glMultMatrixf
|
||||||
|
glMultMatrixd = _glMultMatrixd
|
||||||
|
glPopMatrix = _glPopMatrix
|
||||||
|
glPushMatrix = _glPushMatrix
|
||||||
|
glRotated = _glRotated
|
||||||
|
glRotatef = _glRotatef
|
||||||
|
glScaled = _glScaled
|
||||||
|
glScalef = _glScalef
|
||||||
|
glTranslated = _glTranslated
|
||||||
|
glTranslatef = _glTranslatef
|
||||||
|
glArrayElement = _glArrayElement
|
||||||
|
glBindTexture = _glBindTexture
|
||||||
|
glColorPointer = _glColorPointer
|
||||||
|
glDisableClientState = _glDisableClientState
|
||||||
|
glDrawArrays = _glDrawArrays
|
||||||
|
glDrawElements = _glDrawElements
|
||||||
|
glEdgeFlagPointer = _glEdgeFlagPointer
|
||||||
|
glEnableClientState = _glEnableClientState
|
||||||
|
glIndexPointer = _glIndexPointer
|
||||||
|
glIndexub = _glIndexub
|
||||||
|
glIndexubv = _glIndexubv
|
||||||
|
glInterleavedArrays = _glInterleavedArrays
|
||||||
|
glNormalPointer = _glNormalPointer
|
||||||
|
glPolygonOffset = _glPolygonOffset
|
||||||
|
glTexCoordPointer = _glTexCoordPointer
|
||||||
|
glVertexPointer = _glVertexPointer
|
||||||
|
glGetPointerv = _glGetPointerv
|
||||||
|
glPopClientAttrib = _glPopClientAttrib
|
||||||
|
glPushClientAttrib = _glPushClientAttrib
|
||||||
|
glClear = _glClear
|
||||||
|
glClearAccum = _glClearAccum
|
||||||
|
glClearIndex = _glClearIndex
|
||||||
|
glClearColor = _glClearColor
|
||||||
|
glClearStencil = _glClearStencil
|
||||||
|
glClearDepth = _glClearDepth
|
||||||
|
glBitmap = _glBitmap
|
||||||
|
glTexImage1D = _glTexImage1D
|
||||||
|
glTexImage2D = _glTexImage2D
|
||||||
|
glCopyPixels = _glCopyPixels
|
||||||
|
glReadPixels = _glReadPixels
|
||||||
|
glDrawPixels = _glDrawPixels
|
||||||
|
glRectd = _glRectd
|
||||||
|
glRectdv = _glRectdv
|
||||||
|
glRectf = _glRectf
|
||||||
|
glRectfv = _glRectfv
|
||||||
|
glRecti = _glRecti
|
||||||
|
glRectiv = _glRectiv
|
||||||
|
glRects = _glRects
|
||||||
|
glRectsv = _glRectsv
|
||||||
|
glNewList = _glNewList
|
||||||
|
glEndList = _glEndList
|
||||||
|
glDeleteLists = _glDeleteLists
|
||||||
|
glGenLists = _glGenLists
|
||||||
|
glListBase = _glListBase
|
||||||
|
glRasterPos2d = _glRasterPos2d
|
||||||
|
glRasterPos2dv = _glRasterPos2dv
|
||||||
|
glRasterPos2f = _glRasterPos2f
|
||||||
|
glRasterPos2fv = _glRasterPos2fv
|
||||||
|
glRasterPos2i = _glRasterPos2i
|
||||||
|
glRasterPos2iv = _glRasterPos2iv
|
||||||
|
glRasterPos2s = _glRasterPos2s
|
||||||
|
glRasterPos2sv = _glRasterPos2sv
|
||||||
|
glRasterPos3d = _glRasterPos3d
|
||||||
|
glRasterPos3dv = _glRasterPos3dv
|
||||||
|
glRasterPos3f = _glRasterPos3f
|
||||||
|
glRasterPos3fv = _glRasterPos3fv
|
||||||
|
glRasterPos3i = _glRasterPos3i
|
||||||
|
glRasterPos3iv = _glRasterPos3iv
|
||||||
|
glRasterPos3s = _glRasterPos3s
|
||||||
|
glRasterPos3sv = _glRasterPos3sv
|
||||||
|
glRasterPos4d = _glRasterPos4d
|
||||||
|
glRasterPos4dv = _glRasterPos4dv
|
||||||
|
glRasterPos4f = _glRasterPos4f
|
||||||
|
glRasterPos4fv = _glRasterPos4fv
|
||||||
|
glRasterPos4i = _glRasterPos4i
|
||||||
|
glRasterPos4iv = _glRasterPos4iv
|
||||||
|
glRasterPos4s = _glRasterPos4s
|
||||||
|
glRasterPos4sv = _glRasterPos4sv
|
||||||
|
glClipPlane = _glClipPlane
|
||||||
|
glColorMaterial = _glColorMaterial
|
||||||
|
glCullFace = _glCullFace
|
||||||
|
glFogf = _glFogf
|
||||||
|
glFogfv = _glFogfv
|
||||||
|
glFogi = _glFogi
|
||||||
|
glFogiv = _glFogiv
|
||||||
|
glFrontFace = _glFrontFace
|
||||||
|
glHint = _glHint
|
||||||
|
glLightf = _glLightf
|
||||||
|
glLightfv = _glLightfv
|
||||||
|
glLighti = _glLighti
|
||||||
|
glLightiv = _glLightiv
|
||||||
|
glLightModelf = _glLightModelf
|
||||||
|
glLightModelfv = _glLightModelfv
|
||||||
|
glLightModeli = _glLightModeli
|
||||||
|
glLightModeliv = _glLightModeliv
|
||||||
|
glLineStipple = _glLineStipple
|
||||||
|
glLineWidth = _glLineWidth
|
||||||
|
glPointSize = _glPointSize
|
||||||
|
glPolygonMode = _glPolygonMode
|
||||||
|
glPolygonStipple = _glPolygonStipple
|
||||||
|
glScissor = _glScissor
|
||||||
|
glFinish = _glFinish
|
||||||
|
glShadeModel = _glShadeModel
|
||||||
|
glTexParameterf = _glTexParameterf
|
||||||
|
glTexParameterfv = _glTexParameterfv
|
||||||
|
glTexParameteri = _glTexParameteri
|
||||||
|
glTexParameteriv = _glTexParameteriv
|
||||||
|
glTexEnvf = _glTexEnvf
|
||||||
|
glTexEnvfv = _glTexEnvfv
|
||||||
|
glTexEnvi = _glTexEnvi
|
||||||
|
glTexEnviv = _glTexEnviv
|
||||||
|
glTexGend = _glTexGend
|
||||||
|
glTexGendv = _glTexGendv
|
||||||
|
glTexGenf = _glTexGenf
|
||||||
|
glTexGenfv = _glTexGenfv
|
||||||
|
glTexGeni = _glTexGeni
|
||||||
|
glTexGeniv = _glTexGeniv
|
||||||
|
glFeedbackBuffer = _glFeedbackBuffer
|
||||||
|
glSelectBuffer = _glSelectBuffer
|
||||||
|
glRenderMode = _glRenderMode
|
||||||
|
glInitNames = _glInitNames
|
||||||
|
glLoadName = _glLoadName
|
||||||
|
glPassThrough = _glPassThrough
|
||||||
|
glPopName = _glPopName
|
||||||
|
glPushName = _glPushName
|
||||||
|
glDrawBuffer = _glDrawBuffer
|
||||||
|
glStencilMask = _glStencilMask
|
||||||
|
glColorMask = _glColorMask
|
||||||
|
glDepthMask = _glDepthMask
|
||||||
|
glIndexMask = _glIndexMask
|
||||||
|
glAccum = _glAccum
|
||||||
|
glFlush = _glFlush
|
||||||
|
glMap1d = _glMap1d
|
||||||
|
glMap1f = _glMap1f
|
||||||
|
glMap2d = _glMap2d
|
||||||
|
glMap2f = _glMap2f
|
||||||
|
glMapGrid1d = _glMapGrid1d
|
||||||
|
glMapGrid1f = _glMapGrid1f
|
||||||
|
glMapGrid2d = _glMapGrid2d
|
||||||
|
glMapGrid2f = _glMapGrid2f
|
||||||
|
glEvalMesh1 = _glEvalMesh1
|
||||||
|
glEvalMesh2 = _glEvalMesh2
|
||||||
|
glAlphaFunc = _glAlphaFunc
|
||||||
|
glBlendFunc = _glBlendFunc
|
||||||
|
glLogicOp = _glLogicOp
|
||||||
|
glStencilFunc = _glStencilFunc
|
||||||
|
glStencilOp = _glStencilOp
|
||||||
|
glDepthFunc = _glDepthFunc
|
||||||
|
glPixelZoom = _glPixelZoom
|
||||||
|
glPixelTransferf = _glPixelTransferf
|
||||||
|
glPixelTransferi = _glPixelTransferi
|
||||||
|
glPixelStoref = _glPixelStoref
|
||||||
|
glPixelStorei = _glPixelStorei
|
||||||
|
glPixelMapfv = _glPixelMapfv
|
||||||
|
glPixelMapuiv = _glPixelMapuiv
|
||||||
|
glPixelMapusv = _glPixelMapusv
|
||||||
|
glReadBuffer = _glReadBuffer
|
||||||
|
glGetBooleanv = _glGetBooleanv
|
||||||
|
glGetClipPlane = _glGetClipPlane
|
||||||
|
glGetDoublev = _glGetDoublev
|
||||||
|
glGetError = _glGetError
|
||||||
|
glGetFloatv = _glGetFloatv
|
||||||
|
glGetIntegerv = _glGetIntegerv
|
||||||
|
glGetLightfv = _glGetLightfv
|
||||||
|
glGetLightiv = _glGetLightiv
|
||||||
|
glGetMapdv = _glGetMapdv
|
||||||
|
glGetMapfv = _glGetMapfv
|
||||||
|
glGetMapiv = _glGetMapiv
|
||||||
|
glGetMaterialfv = _glGetMaterialfv
|
||||||
|
glGetMaterialiv = _glGetMaterialiv
|
||||||
|
glGetPixelMapfv = _glGetPixelMapfv
|
||||||
|
glGetPixelMapuiv = _glGetPixelMapuiv
|
||||||
|
glGetPixelMapusv = _glGetPixelMapusv
|
||||||
|
glGetPolygonStipple = _glGetPolygonStipple
|
||||||
|
glGetString = _glGetString
|
||||||
|
glGetTexEnvfv = _glGetTexEnvfv
|
||||||
|
glGetTexEnviv = _glGetTexEnviv
|
||||||
|
glGetTexGendv = _glGetTexGendv
|
||||||
|
glGetTexGenfv = _glGetTexGenfv
|
||||||
|
glGetTexGeniv = _glGetTexGeniv
|
||||||
|
glGetTexImage = _glGetTexImage
|
||||||
|
glGetTexParameterfv = _glGetTexParameterfv
|
||||||
|
glGetTexParameteriv = _glGetTexParameteriv
|
||||||
|
glGetTexLevelParameterfv = _glGetTexLevelParameterfv
|
||||||
|
glGetTexLevelParameteriv = _glGetTexLevelParameteriv
|
||||||
|
glIsEnabled = _glIsEnabled
|
||||||
|
glIsList = _glIsList
|
||||||
|
glDepthRange = _glDepthRange
|
||||||
|
glFrustum = _glFrustum
|
||||||
|
glOrtho = _glOrtho
|
||||||
|
glViewport = _glViewport
|
||||||
|
glAreTexturesResident = _glAreTexturesResident
|
||||||
|
glCopyTexImage1D = _glCopyTexImage1D
|
||||||
|
glCopyTexImage2D = _glCopyTexImage2D
|
||||||
|
glCopyTexSubImage1D = _glCopyTexSubImage1D
|
||||||
|
glCopyTexSubImage2D = _glCopyTexSubImage2D
|
||||||
|
glDeleteTextures = _glDeleteTextures
|
||||||
|
glGenTextures = _glGenTextures
|
||||||
|
glIsTexture = _glIsTexture
|
||||||
|
glPrioritizeTextures = _glPrioritizeTextures
|
||||||
|
glTexSubImage1D = _glTexSubImage1D
|
||||||
|
glTexSubImage2D = _glTexSubImage2D
|
||||||
|
|
||||||
|
PlaySoundW = _PlaySoundW
|
||||||
|
timeSetEvent = _timeSetEvent
|
||||||
|
timeKillEvent = _timeKillEvent
|
||||||
|
midiOutMessage = _midiOutMessage
|
||||||
|
timeBeginPeriod = _timeBeginPeriod
|
||||||
|
timeGetTime = _timeGetTime
|
||||||
|
NotifyCallbackData = _NotifyCallbackData
|
||||||
|
WOW32DriverCallback = _WOW32DriverCallback
|
||||||
|
WOW32ResolveMultiMediaHandle = _WOW32ResolveMultiMediaHandle
|
||||||
|
aux32Message = _aux32Message
|
||||||
|
joy32Message = _joy32Message
|
||||||
|
mid32Message = _mid32Message
|
||||||
|
mod32Message = _mod32Message
|
||||||
|
mxd32Message = _mxd32Message
|
||||||
|
tid32Message = _tid32Message
|
||||||
|
wid32Message = _wid32Message
|
||||||
|
wod32Message = _wod32Message
|
||||||
|
mci32Message = _mci32Message
|
||||||
|
CloseDriver = _CloseDriver
|
||||||
|
DefDriverProc = _DefDriverProc
|
||||||
|
DriverCallback = _DriverCallback
|
||||||
|
DrvGetModuleHandle = _DrvGetModuleHandle
|
||||||
|
GetDriverModuleHandle = _GetDriverModuleHandle
|
||||||
|
OpenDriver = _OpenDriver
|
||||||
|
PlaySound = _PlaySound
|
||||||
|
Ordinal2 = _Ordinal2
|
||||||
|
SendDriverMessage = _SendDriverMessage
|
||||||
|
auxGetDevCapsA = _auxGetDevCapsA
|
||||||
|
auxGetDevCapsW = _auxGetDevCapsW
|
||||||
|
auxGetNumDevs = _auxGetNumDevs
|
||||||
|
auxGetVolume = _auxGetVolume
|
||||||
|
auxOutMessage = _auxOutMessage
|
||||||
|
auxSetVolume = _auxSetVolume
|
||||||
|
joyConfigChanged = _joyConfigChanged
|
||||||
|
joyGetDevCapsA = _joyGetDevCapsA
|
||||||
|
joyGetDevCapsW = _joyGetDevCapsW
|
||||||
|
joyGetNumDevs = _joyGetNumDevs
|
||||||
|
joyGetPosEx = _joyGetPosEx
|
||||||
|
joyGetPos = _joyGetPos
|
||||||
|
joyGetThreshold = _joyGetThreshold
|
||||||
|
joyReleaseCapture = _joyReleaseCapture
|
||||||
|
joySetCapture = _joySetCapture
|
||||||
|
joySetThreshold = _joySetThreshold
|
||||||
|
midiConnect = _midiConnect
|
||||||
|
midiDisconnect = _midiDisconnect
|
||||||
|
midiInAddBuffer = _midiInAddBuffer
|
||||||
|
midiInClose = _midiInClose
|
||||||
|
midiInGetDevCapsA = _midiInGetDevCapsA
|
||||||
|
midiInGetDevCapsW = _midiInGetDevCapsW
|
||||||
|
midiInGetErrorTextA = _midiInGetErrorTextA
|
||||||
|
midiInGetErrorTextW = _midiInGetErrorTextW
|
||||||
|
midiInGetID = _midiInGetID
|
||||||
|
midiInGetNumDevs = _midiInGetNumDevs
|
||||||
|
midiInMessage = _midiInMessage
|
||||||
|
midiInOpen = _midiInOpen
|
||||||
|
midiInPrepareHeader = _midiInPrepareHeader
|
||||||
|
midiInReset = _midiInReset
|
||||||
|
midiInStart = _midiInStart
|
||||||
|
midiInStop = _midiInStop
|
||||||
|
midiInUnprepareHeader = _midiInUnprepareHeader
|
||||||
|
midiOutCacheDrumPatches = _midiOutCacheDrumPatches
|
||||||
|
midiOutCachePatches = _midiOutCachePatches
|
||||||
|
midiOutClose = _midiOutClose
|
||||||
|
midiOutGetDevCapsA = _midiOutGetDevCapsA
|
||||||
|
midiOutGetDevCapsW = _midiOutGetDevCapsW
|
||||||
|
midiOutGetErrorTextA = _midiOutGetErrorTextA
|
||||||
|
midiOutGetErrorTextW = _midiOutGetErrorTextW
|
||||||
|
midiOutGetID = _midiOutGetID
|
||||||
|
midiOutGetNumDevs = _midiOutGetNumDevs
|
||||||
|
midiOutGetVolume = _midiOutGetVolume
|
||||||
|
midiOutLongMsg = _midiOutLongMsg
|
||||||
|
midiOutOpen = _midiOutOpen
|
||||||
|
midiOutPrepareHeader = _midiOutPrepareHeader
|
||||||
|
midiOutReset = _midiOutReset
|
||||||
|
midiOutSetVolume = _midiOutSetVolume
|
||||||
|
midiOutShortMsg = _midiOutShortMsg
|
||||||
|
midiOutUnprepareHeader = _midiOutUnprepareHeader
|
||||||
|
midiStreamClose = _midiStreamClose
|
||||||
|
midiStreamOpen = _midiStreamOpen
|
||||||
|
midiStreamOut = _midiStreamOut
|
||||||
|
midiStreamPause = _midiStreamPause
|
||||||
|
midiStreamPosition = _midiStreamPosition
|
||||||
|
midiStreamProperty = _midiStreamProperty
|
||||||
|
midiStreamRestart = _midiStreamRestart
|
||||||
|
midiStreamStop = _midiStreamStop
|
||||||
|
mixerClose = _mixerClose
|
||||||
|
mixerGetControlDetailsA = _mixerGetControlDetailsA
|
||||||
|
mixerGetControlDetailsW = _mixerGetControlDetailsW
|
||||||
|
mixerGetDevCapsA = _mixerGetDevCapsA
|
||||||
|
mixerGetDevCapsW = _mixerGetDevCapsW
|
||||||
|
mixerGetID = _mixerGetID
|
||||||
|
mixerGetLineControlsA = _mixerGetLineControlsA
|
||||||
|
mixerGetLineControlsW = _mixerGetLineControlsW
|
||||||
|
mixerGetLineInfoA = _mixerGetLineInfoA
|
||||||
|
mixerGetLineInfoW = _mixerGetLineInfoW
|
||||||
|
mixerGetNumDevs = _mixerGetNumDevs
|
||||||
|
mixerMessage = _mixerMessage
|
||||||
|
mixerOpen = _mixerOpen
|
||||||
|
mixerSetControlDetails = _mixerSetControlDetails
|
||||||
|
mmDrvInstall = _mmDrvInstall
|
||||||
|
mmGetCurrentTask = _mmGetCurrentTask
|
||||||
|
mmTaskBlock = _mmTaskBlock
|
||||||
|
mmTaskCreate = _mmTaskCreate
|
||||||
|
mmTaskSignal = _mmTaskSignal
|
||||||
|
mmTaskYield = _mmTaskYield
|
||||||
|
mmioAdvance = _mmioAdvance
|
||||||
|
mmioAscend = _mmioAscend
|
||||||
|
mmioClose = _mmioClose
|
||||||
|
mmioCreateChunk = _mmioCreateChunk
|
||||||
|
mmioDescend = _mmioDescend
|
||||||
|
mmioFlush = _mmioFlush
|
||||||
|
mmioGetInfo = _mmioGetInfo
|
||||||
|
mmioInstallIOProcA = _mmioInstallIOProcA
|
||||||
|
mmioInstallIOProcW = _mmioInstallIOProcW
|
||||||
|
mmioOpenA = _mmioOpenA
|
||||||
|
mmioOpenW = _mmioOpenW
|
||||||
|
mmioRead = _mmioRead
|
||||||
|
mmioRenameA = _mmioRenameA
|
||||||
|
mmioRenameW = _mmioRenameW
|
||||||
|
mmioSeek = _mmioSeek
|
||||||
|
mmioSendMessage = _mmioSendMessage
|
||||||
|
mmioSetBuffer = _mmioSetBuffer
|
||||||
|
mmioSetInfo = _mmioSetInfo
|
||||||
|
mmioStringToFOURCCA = _mmioStringToFOURCCA
|
||||||
|
mmioStringToFOURCCW = _mmioStringToFOURCCW
|
||||||
|
mmioWrite = _mmioWrite
|
||||||
|
timeEndPeriod = _timeEndPeriod
|
||||||
|
timeGetDevCaps = _timeGetDevCaps
|
||||||
|
timeGetSystemTime = _timeGetSystemTime
|
||||||
|
waveInAddBuffer = _waveInAddBuffer
|
||||||
|
waveInClose = _waveInClose
|
||||||
|
waveInGetDevCapsA = _waveInGetDevCapsA
|
||||||
|
waveInGetDevCapsW = _waveInGetDevCapsW
|
||||||
|
waveInGetErrorTextA = _waveInGetErrorTextA
|
||||||
|
waveInGetErrorTextW = _waveInGetErrorTextW
|
||||||
|
waveInGetID = _waveInGetID
|
||||||
|
waveInGetNumDevs = _waveInGetNumDevs
|
||||||
|
waveInGetPosition = _waveInGetPosition
|
||||||
|
waveInMessage = _waveInMessage
|
||||||
|
waveInOpen = _waveInOpen
|
||||||
|
waveInPrepareHeader = _waveInPrepareHeader
|
||||||
|
waveInReset = _waveInReset
|
||||||
|
waveInStart = _waveInStart
|
||||||
|
waveInStop = _waveInStop
|
||||||
|
waveInUnprepareHeader = _waveInUnprepareHeader
|
||||||
|
waveOutBreakLoop = _waveOutBreakLoop
|
||||||
|
waveOutClose = _waveOutClose
|
||||||
|
waveOutGetDevCapsA = _waveOutGetDevCapsA
|
||||||
|
waveOutGetDevCapsW = _waveOutGetDevCapsW
|
||||||
|
waveOutGetErrorTextA = _waveOutGetErrorTextA
|
||||||
|
waveOutGetErrorTextW = _waveOutGetErrorTextW
|
||||||
|
waveOutGetID = _waveOutGetID
|
||||||
|
waveOutGetNumDevs = _waveOutGetNumDevs
|
||||||
|
waveOutGetPitch = _waveOutGetPitch
|
||||||
|
waveOutGetPlaybackRate = _waveOutGetPlaybackRate
|
||||||
|
waveOutGetPosition = _waveOutGetPosition
|
||||||
|
waveOutGetVolume = _waveOutGetVolume
|
||||||
|
waveOutMessage = _waveOutMessage
|
||||||
|
waveOutOpen = _waveOutOpen
|
||||||
|
waveOutPause = _waveOutPause
|
||||||
|
waveOutPrepareHeader = _waveOutPrepareHeader
|
||||||
|
waveOutReset = _waveOutReset
|
||||||
|
waveOutRestart = _waveOutRestart
|
||||||
|
waveOutSetPitch = _waveOutSetPitch
|
||||||
|
waveOutSetPlaybackRate = _waveOutSetPlaybackRate
|
||||||
|
waveOutSetVolume = _waveOutSetVolume
|
||||||
|
waveOutUnprepareHeader = _waveOutUnprepareHeader
|
||||||
|
waveOutWrite = _waveOutWrite
|
||||||
|
mciExecute = _mciExecute
|
||||||
|
mciGetErrorStringA = _mciGetErrorStringA
|
||||||
|
mciGetErrorStringW = _mciGetErrorStringW
|
||||||
|
mciSendCommandA = _mciSendCommandA
|
||||||
|
mciSendCommandW = _mciSendCommandW
|
||||||
|
mciSendStringA = _mciSendStringA
|
||||||
|
mciSendStringW = _mciSendStringW
|
||||||
|
mciFreeCommandResource = _mciFreeCommandResource
|
||||||
|
mciLoadCommandResource = _mciLoadCommandResource
|
||||||
|
mciDriverNotify = _mciDriverNotify
|
||||||
|
mciDriverYield = _mciDriverYield
|
||||||
|
mciGetCreatorTask = _mciGetCreatorTask
|
||||||
|
mciGetDeviceIDA = _mciGetDeviceIDA
|
||||||
|
mciGetDeviceIDFromElementIDA = _mciGetDeviceIDFromElementIDA
|
||||||
|
mciGetDeviceIDFromElementIDW = _mciGetDeviceIDFromElementIDW
|
||||||
|
mciGetDeviceIDW = _mciGetDeviceIDW
|
||||||
|
mciGetDriverData = _mciGetDriverData
|
||||||
|
mciGetYieldProc = _mciGetYieldProc
|
||||||
|
mciSetDriverData = _mciSetDriverData
|
||||||
|
mciSetYieldProc = _mciSetYieldProc
|
||||||
|
PlaySoundA = _PlaySoundA
|
||||||
|
sndPlaySoundA = _sndPlaySoundA
|
||||||
|
sndPlaySoundW = _sndPlaySoundW
|
||||||
|
WOWAppExit = _WOWAppExit
|
||||||
|
mmsystemGetVersion = _mmsystemGetVersion
|
||||||
|
|
||||||
|
TPValues = TPValues
|
5
packages.config
Normal file
5
packages.config
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="sdl2" version="2.0.5" targetFramework="native" />
|
||||||
|
<package id="sdl2.redist" version="2.0.5" targetFramework="native" />
|
||||||
|
</packages>
|
Loading…
Reference in New Issue
Block a user