mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Merge pull request #453 from Lgt2x/remove-intellivibe
Remove intellivibe interface
This commit is contained in:
commit
743f782815
@ -134,7 +134,6 @@ set(HEADERS
|
||||
terrain.h
|
||||
trigger.h
|
||||
vclip.h
|
||||
vibeinterface.h
|
||||
viseffect.h
|
||||
viseffect_external.h
|
||||
voice.h
|
||||
@ -197,7 +196,6 @@ set(CPPS
|
||||
huddisplay.cpp
|
||||
hudmessage.cpp
|
||||
init.cpp
|
||||
intellivibe.cpp
|
||||
Inventory.cpp
|
||||
levelgoal.cpp
|
||||
lighting.cpp
|
||||
|
@ -876,7 +876,6 @@
|
||||
#include "grtext.h"
|
||||
#include "gamefont.h"
|
||||
#include "renderobject.h"
|
||||
#include "vibeinterface.h"
|
||||
#include "buddymenu.h"
|
||||
|
||||
#ifdef EDITOR
|
||||
@ -2948,9 +2947,6 @@ void GameFrame(void) {
|
||||
}
|
||||
|
||||
#endif
|
||||
// Do our first quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(true);
|
||||
|
||||
// clear out music struct
|
||||
memset(&Game_music_info, 0, sizeof(Game_music_info));
|
||||
|
||||
@ -3021,9 +3017,6 @@ void GameFrame(void) {
|
||||
DoPlayerFrame();
|
||||
RTP_tENDTIME(playerframe_time, curr_time);
|
||||
|
||||
// Do our second quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(false);
|
||||
|
||||
// Weather frame
|
||||
RTP_tSTARTTIME(weatherframe_time, curr_time);
|
||||
DoWeatherForFrame();
|
||||
@ -3048,15 +3041,8 @@ void GameFrame(void) {
|
||||
// Process any in-game cinematics
|
||||
Cinematic_Frame();
|
||||
|
||||
// Do our third quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(false);
|
||||
|
||||
} else {
|
||||
// Do our second quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(false);
|
||||
Sleep(3);
|
||||
// Do our third quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(false);
|
||||
}
|
||||
|
||||
// do music always.
|
||||
@ -3076,12 +3062,6 @@ void GameFrame(void) {
|
||||
MultiDoFrame();
|
||||
RTP_tENDTIME(multiframe_time, curr_time);
|
||||
|
||||
// Do Gamespy stuff
|
||||
// gspy_DoFrame();
|
||||
|
||||
// Do our fourth quaterframe of IntelliVIBE
|
||||
VIBE_DoQuaterFrame(false);
|
||||
|
||||
#ifdef USE_RTP
|
||||
RTP_GETCLOCK(curr_time); // update the current time, since something has happened since ENDFTIME
|
||||
#endif
|
||||
|
@ -1132,8 +1132,6 @@
|
||||
#include "config.h"
|
||||
#include "osiris_dll.h"
|
||||
#include "gamesequence.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -1572,11 +1570,6 @@ void InitPlayerNewShip(int slot, int inven_reset) {
|
||||
(ObjGet(Buddy_handle[slot])->type != OBJ_ROBOT))
|
||||
Players[slot].inventory.Add(OBJ_ROBOT, ROBOT_GUIDEBOT);
|
||||
}
|
||||
|
||||
// update IntelliVIBE
|
||||
if (slot == Player_num) {
|
||||
VIBE_PlayerRespawn();
|
||||
}
|
||||
}
|
||||
|
||||
// Gives the named player an afterburner
|
||||
|
@ -941,7 +941,6 @@
|
||||
#include "doorway.h"
|
||||
#include "psrand.h"
|
||||
#include "BOA.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -3025,9 +3024,6 @@ void FireWeaponFromPlayer(object *objp, int weapon_type, int down_count, bool do
|
||||
if (Demo_flags == DF_RECORDING) {
|
||||
DemoWriteObjWeapFireFlagChanged(OBJNUM(objp));
|
||||
}
|
||||
|
||||
// tell IntelliVIBE that we fired a weapon
|
||||
VIBE_WeaponFire(weapon_type);
|
||||
}
|
||||
|
||||
// Fires a flare from our player.
|
||||
|
@ -586,7 +586,6 @@
|
||||
#include "AIGoal.h"
|
||||
#include "viseffect.h"
|
||||
#include "psrand.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@ -689,11 +688,6 @@ void DecreasePlayerShields(int slot, float damage) {
|
||||
Multi_bail_ui_menu = true;
|
||||
|
||||
Game_music_info.player_damaged = true;
|
||||
|
||||
// update IntelliVIBE
|
||||
if (damage > 0) {
|
||||
VIBE_DoPlayerDamage(damage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -763,11 +757,6 @@ void PlayPlayerInvulnerabilitySound(object *playerobj) {
|
||||
// Kills the player
|
||||
// weapon_id can be -1 for no weapon
|
||||
void KillPlayer(object *playerobj, object *killer, float damage_amount, int weapon_id) {
|
||||
// tell IntelliVIBE that the player is dying
|
||||
if (playerobj->id == Player_num) {
|
||||
VIBE_PlayerDeath();
|
||||
}
|
||||
|
||||
// Save the killer
|
||||
Players[playerobj->id].killer_objnum = killer ? OBJNUM(killer) : 0;
|
||||
|
||||
|
@ -1088,7 +1088,6 @@
|
||||
#include "gamepath.h"
|
||||
#include "vclip.h"
|
||||
#include "bsp.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
#include "args.h"
|
||||
void ResetHudMessages(void);
|
||||
@ -1895,9 +1894,6 @@ void FlushDataCache() {
|
||||
|
||||
// Parameter: state - 1 = success, 0 = failure, -1 = abort
|
||||
void EndLevel(int state) {
|
||||
// tell IntelliVIBE
|
||||
VIBE_DoLevelEnd();
|
||||
|
||||
tLevelNode *lvl = &Current_mission.levels[Current_mission.cur_level - 1];
|
||||
|
||||
// Tells all the clients to end the level
|
||||
|
@ -976,7 +976,6 @@
|
||||
#include "marker.h"
|
||||
#include "gamecinematics.h"
|
||||
#include "debuggraph.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
// Uncomment this to allow all languages
|
||||
#define ALLOW_ALL_LANG 1
|
||||
@ -1905,8 +1904,6 @@ void InitD3Systems1(bool editor) {
|
||||
// Initialize Cinematics system
|
||||
InitCinematics();
|
||||
|
||||
// Initialize IntelliVIBE (if available)
|
||||
VIBE_Init(Descent);
|
||||
}
|
||||
|
||||
// Initialize rest of stuff
|
||||
|
@ -1,227 +0,0 @@
|
||||
/*
|
||||
* Descent 3
|
||||
* Copyright (C) 2024 Parallax Software
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
--- HISTORICAL COMMENTS FOLLOW ---
|
||||
|
||||
* $Logfile: /DescentIII/Main/intellivibe.cpp $
|
||||
* $Revision: 5 $
|
||||
* $Date: 4/28/00 6:49p $
|
||||
* $Author: Jeff $
|
||||
*
|
||||
* IntelliVIBE interface
|
||||
*
|
||||
* $Log: /DescentIII/Main/intellivibe.cpp $
|
||||
*
|
||||
* 5 4/28/00 6:49p Jeff
|
||||
* created stub functions for non-win32
|
||||
*
|
||||
* 4 3/30/00 6:00p Jeff
|
||||
* changed name of ivibe dll
|
||||
*
|
||||
* 3 1/27/00 12:04p Jeff
|
||||
* updated IntelliVIBE to match new specs
|
||||
*
|
||||
* 2 1/26/00 9:20p Jeff
|
||||
* added support for IntelliVIBE DLL
|
||||
*
|
||||
* $NoKeywords: $
|
||||
*/
|
||||
|
||||
#include "vibeinterface.h"
|
||||
|
||||
#ifndef WIN32
|
||||
void VIBE_Init(oeApplication *app) {}
|
||||
void VIBE_Close(void) {}
|
||||
void VIBE_DoFrame(void) {}
|
||||
void VIBE_WeaponFire(int weapon_index) {}
|
||||
void VIBE_DoControls(game_controls *controls) {}
|
||||
void VIBE_PlayerRespawn(void) {}
|
||||
void VIBE_PlayerDeath(void) {}
|
||||
void VIBE_DoForce(vector *force_vec, int weapon_index) {}
|
||||
void VIBE_DoPlayerDamage(float damage_amount) {}
|
||||
void VIBE_DoQuaterFrame(bool) {}
|
||||
void VIBE_DoForce(vector *) {}
|
||||
void VIBE_DoLevelEnd(void) {}
|
||||
#else
|
||||
|
||||
#include "intellivibe.h"
|
||||
#include "module.h"
|
||||
#include "mono.h"
|
||||
#include "object_external_struct.h"
|
||||
|
||||
static module IntelliVIBE_module = {NULL};
|
||||
static d3_intellivibe IntelliVIBE_state; // our current state
|
||||
static IntelliVIBE_Initialize_fp IVIBE_Initialize = NULL;
|
||||
static IntelliVIBE_Shutdown_fp IVIBE_Shutdown = NULL;
|
||||
static IntelliVIBE_DoQuaterFrame_fp IVIBE_DoQuaterFrame = NULL;
|
||||
|
||||
#define TEST_MODULE(x) \
|
||||
{ \
|
||||
if (!(x)) { \
|
||||
mprintf(0, "IntelliVIBE unable to find: %s\n", #x); \
|
||||
mod_FreeModule(&IntelliVIBE_module); \
|
||||
IntelliVIBE_module.handle = NULL; \
|
||||
return; \
|
||||
} \
|
||||
}
|
||||
void VIBE_Init(oeApplication *app) {
|
||||
if (!mod_LoadModule(&IntelliVIBE_module, "ivibe_D3.dll")) {
|
||||
mprintf(0, "Unable to load IntelliVIBE DLL\n");
|
||||
IntelliVIBE_module.handle = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
// resolve our functions
|
||||
IVIBE_Initialize = (IntelliVIBE_Initialize_fp)mod_GetSymbol(&IntelliVIBE_module, "IntelliVIBE_Initialize", 4);
|
||||
IVIBE_Shutdown = (IntelliVIBE_Shutdown_fp)mod_GetSymbol(&IntelliVIBE_module, "IntelliVIBE_Shutdown", 0);
|
||||
IVIBE_DoQuaterFrame =
|
||||
(IntelliVIBE_DoQuaterFrame_fp)mod_GetSymbol(&IntelliVIBE_module, "IntelliVIBE_DoQuaterFrame", 4);
|
||||
|
||||
// make sure everything went ok
|
||||
TEST_MODULE(IVIBE_Initialize);
|
||||
TEST_MODULE(IVIBE_Shutdown);
|
||||
TEST_MODULE(IVIBE_DoQuaterFrame);
|
||||
|
||||
d3_init_info info;
|
||||
info.hinst = (HINSTANCE)((oeWin32Application *)app)->m_hInstance;
|
||||
info.hwnd = (HWND)((oeWin32Application *)app)->m_hWnd;
|
||||
|
||||
ASSERT(IVIBE_Initialize != NULL);
|
||||
if (!IVIBE_Initialize(&info)) {
|
||||
mprintf(0, "IntelliVIBE_Initialize failed\n");
|
||||
mod_FreeModule(&IntelliVIBE_module);
|
||||
IntelliVIBE_module.handle = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
// Initialize our current state
|
||||
memset(&IntelliVIBE_state, 0, sizeof(IntelliVIBE_state));
|
||||
|
||||
atexit(VIBE_Close);
|
||||
}
|
||||
|
||||
void VIBE_Close(void) {
|
||||
if (IntelliVIBE_module.handle == NULL)
|
||||
return;
|
||||
ASSERT(IVIBE_Shutdown != NULL);
|
||||
|
||||
IVIBE_Shutdown();
|
||||
mod_FreeModule(&IntelliVIBE_module);
|
||||
IntelliVIBE_module.handle = NULL;
|
||||
}
|
||||
|
||||
extern bool Game_paused;
|
||||
extern float Frametime;
|
||||
extern float Gametime;
|
||||
extern float Shake_magnitude;
|
||||
extern object *Player_object;
|
||||
|
||||
// Informs us of a quater-frame tick
|
||||
void VIBE_DoQuaterFrame(bool first_frame) {
|
||||
if (IntelliVIBE_module.handle == NULL)
|
||||
return;
|
||||
ASSERT(IVIBE_DoQuaterFrame != NULL);
|
||||
|
||||
static char quater_frame_count = 0;
|
||||
|
||||
if (first_frame) {
|
||||
// reset the flags
|
||||
IntelliVIBE_state.flags = 0;
|
||||
IntelliVIBE_state.damage_info.damage_amount = 0;
|
||||
IntelliVIBE_state.force_info.force_vector.x = IntelliVIBE_state.force_info.force_vector.y =
|
||||
IntelliVIBE_state.force_info.force_vector.z = 0;
|
||||
quater_frame_count = 0;
|
||||
} else {
|
||||
quater_frame_count++;
|
||||
}
|
||||
|
||||
// set our frametime and stuff
|
||||
IntelliVIBE_state.frame_info.frametime = Frametime;
|
||||
IntelliVIBE_state.frame_info.gametime = Gametime;
|
||||
IntelliVIBE_state.frame_info.game_paused = (Game_paused) ? 1 : 0;
|
||||
|
||||
// reset the quaterframe flags
|
||||
IntelliVIBE_state.flags &=
|
||||
~(VIBEFLAG_QUATERFRAME_0 | VIBEFLAG_QUATERFRAME_1 | VIBEFLAG_QUATERFRAME_2 | VIBEFLAG_QUATERFRAME_3);
|
||||
|
||||
// set the flag for which quaterframe we are on
|
||||
switch (quater_frame_count) {
|
||||
case 0:
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_QUATERFRAME_0;
|
||||
break;
|
||||
case 1:
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_QUATERFRAME_1;
|
||||
break;
|
||||
case 2:
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_QUATERFRAME_2;
|
||||
break;
|
||||
case 3:
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_QUATERFRAME_3;
|
||||
break;
|
||||
}
|
||||
|
||||
// send a quaterframe tick to IntelliVIBE
|
||||
IVIBE_DoQuaterFrame(&IntelliVIBE_state);
|
||||
}
|
||||
|
||||
void VIBE_WeaponFire(int weapon_index) {
|
||||
IntelliVIBE_state.fire_info.weapon_index = weapon_index;
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_WEAPON_FIRED;
|
||||
}
|
||||
|
||||
void VIBE_DoControls(game_controls *controls) {
|
||||
IntelliVIBE_state.controls_info.pitch_thrust = controls->pitch_thrust;
|
||||
IntelliVIBE_state.controls_info.heading_thrust = controls->heading_thrust;
|
||||
IntelliVIBE_state.controls_info.bank_thrust = controls->bank_thrust;
|
||||
IntelliVIBE_state.controls_info.vertical_thrust = controls->vertical_thrust;
|
||||
IntelliVIBE_state.controls_info.sideways_thrust = controls->sideways_thrust;
|
||||
IntelliVIBE_state.controls_info.forward_thrust = controls->forward_thrust;
|
||||
IntelliVIBE_state.controls_info.afterburn_thrust = controls->afterburn_thrust;
|
||||
IntelliVIBE_state.controls_info.shake_magnitude = Shake_magnitude;
|
||||
IntelliVIBE_state.controls_info.current_velocity.x = Player_object->mtype.phys_info.velocity.x;
|
||||
IntelliVIBE_state.controls_info.current_velocity.y = Player_object->mtype.phys_info.velocity.y;
|
||||
IntelliVIBE_state.controls_info.current_velocity.z = Player_object->mtype.phys_info.velocity.z;
|
||||
}
|
||||
|
||||
void VIBE_PlayerRespawn(void) { IntelliVIBE_state.flags |= VIBEFLAG_PLAYER_RESPAWN; }
|
||||
|
||||
void VIBE_PlayerDeath(void) { IntelliVIBE_state.flags |= VIBEFLAG_PLAYER_DEAD; }
|
||||
|
||||
void VIBE_DoForce(vector *force_vec) {
|
||||
vector curr_force;
|
||||
memcpy(&curr_force, &IntelliVIBE_state.force_info.force_vector, sizeof(vector));
|
||||
|
||||
// add them up...we can have more than one a frame
|
||||
curr_force += *force_vec;
|
||||
memcpy(&IntelliVIBE_state.force_info.force_vector, &curr_force, sizeof(vector));
|
||||
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_FORCE_APPLIED;
|
||||
}
|
||||
|
||||
void VIBE_DoPlayerDamage(float damage_amount) {
|
||||
IntelliVIBE_state.damage_info.damage_amount += damage_amount;
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_PLAYER_DAMAGED;
|
||||
}
|
||||
|
||||
void VIBE_DoLevelEnd(void) {
|
||||
IntelliVIBE_state.flags |= VIBEFLAG_LEVEL_END;
|
||||
|
||||
// force a frame
|
||||
VIBE_DoQuaterFrame(false);
|
||||
}
|
||||
|
||||
#endif
|
@ -1184,7 +1184,6 @@
|
||||
#include "stringtable.h"
|
||||
#include "levelgoal.h"
|
||||
#include "psrand.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
#ifdef EDITOR
|
||||
#include "editor\d3edit.h"
|
||||
@ -2390,11 +2389,6 @@ void DoFlyingControl(object *objp) {
|
||||
}
|
||||
}
|
||||
|
||||
// Update IntelliVIBE
|
||||
if (objp == Player_object) {
|
||||
VIBE_DoControls(&controls);
|
||||
}
|
||||
|
||||
// Send an event to the Game DLLs so they can do any processing of game controls
|
||||
if (Game_mode & GM_MULTI) {
|
||||
DLLInfo.me_handle = DLLInfo.it_handle = objp->handle;
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Descent 3
|
||||
* Copyright (C) 2024 Parallax Software
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef VIBE_H_
|
||||
#define VIBE_H_
|
||||
|
||||
#include "application.h"
|
||||
#include "vecmat_external.h"
|
||||
#include "controls.h"
|
||||
|
||||
// Initialize IntelliVIBE
|
||||
void VIBE_Init(oeApplication *app);
|
||||
|
||||
// Shutdown IntelliVIBE
|
||||
void VIBE_Close(void);
|
||||
|
||||
// Control functions
|
||||
// Informs us of a quater-frame tick
|
||||
void VIBE_DoQuaterFrame(bool first_frame);
|
||||
void VIBE_WeaponFire(int weapon_index);
|
||||
void VIBE_DoControls(game_controls *controls);
|
||||
void VIBE_PlayerRespawn(void);
|
||||
void VIBE_PlayerDeath(void);
|
||||
void VIBE_DoForce(vector *force_vec);
|
||||
void VIBE_DoPlayerDamage(float damage_amount);
|
||||
void VIBE_DoLevelEnd(void);
|
||||
|
||||
#endif
|
@ -134,7 +134,6 @@ set(HEADERS
|
||||
../descent3/terrain.h
|
||||
../descent3/trigger.h
|
||||
../descent3/vclip.h
|
||||
../descent3/vibeinterface.h
|
||||
../descent3/viseffect.h
|
||||
../descent3/viseffect_external.h
|
||||
../descent3/voice.h
|
||||
@ -343,7 +342,6 @@ set(SOURCE
|
||||
../descent3/huddisplay.cpp
|
||||
../descent3/hudmessage.cpp
|
||||
../descent3/init.cpp
|
||||
../descent3/intellivibe.cpp
|
||||
../descent3/Inventory.cpp
|
||||
../descent3/levelgoal.cpp
|
||||
../descent3/lighting.cpp
|
||||
|
@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Descent 3
|
||||
* Copyright (C) 2024 Parallax Software
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __INTELLIVIBE_H_
|
||||
#define __INTELLIVIBE_H_
|
||||
|
||||
#include <windows.h> //needed for HWND and HINSTANCE
|
||||
|
||||
struct fvector {
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct d3_init_info {
|
||||
HWND hwnd; // handle to the Window associated with Descent 3
|
||||
HINSTANCE hinst; // instance of the Descent 3 application
|
||||
};
|
||||
|
||||
struct d3_frame_info {
|
||||
float frametime; // time, in seconds, that the last frame of the game took
|
||||
float gametime; // time, in seconds, that we have been actively playing the current level
|
||||
int game_paused; // 1 if the game is currently paused, 0 if it isn't. Note: if the game is paused, Gametime and
|
||||
// Frametime will be invalid
|
||||
};
|
||||
|
||||
struct d3_fire_info {
|
||||
int weapon_index; // what kind of weapon the player is firing, see weapon defines)
|
||||
};
|
||||
|
||||
struct d3_controls_info {
|
||||
// Values for thrust are from -1.0 to 1.0)
|
||||
float pitch_thrust;
|
||||
float heading_thrust;
|
||||
float bank_thrust;
|
||||
float vertical_thrust;
|
||||
float sideways_thrust;
|
||||
float forward_thrust;
|
||||
float afterburn_thrust;
|
||||
|
||||
fvector current_velocity; // current velocity of the ship
|
||||
float shake_magnitude; // If the player's ship is shaking due to some external force, it will be in this value,
|
||||
// 0<=magnitude<=120
|
||||
|
||||
};
|
||||
|
||||
struct d3_force_info {
|
||||
fvector force_vector; // direction and magnitude of the instantaneous force
|
||||
};
|
||||
|
||||
struct d3_damage_info {
|
||||
float damage_amount; // how much damage is being done
|
||||
};
|
||||
|
||||
struct d3_intellivibe {
|
||||
d3_frame_info frame_info;
|
||||
d3_fire_info fire_info;
|
||||
d3_controls_info controls_info;
|
||||
d3_force_info force_info;
|
||||
d3_damage_info damage_info;
|
||||
int flags;
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Flag Defines
|
||||
#define VIBEFLAG_PLAYER_DEAD 0x00000001
|
||||
#define VIBEFLAG_PLAYER_RESPAWN 0x00000002
|
||||
#define VIBEFLAG_LEVEL_END 0x00000004
|
||||
#define VIBEFLAG_WEAPON_FIRED 0x00000008
|
||||
#define VIBEFLAG_FORCE_APPLIED 0x00000010
|
||||
#define VIBEFLAG_PLAYER_DAMAGED 0x00000020
|
||||
#define VIBEFLAG_QUATERFRAME_0 0x00000040
|
||||
#define VIBEFLAG_QUATERFRAME_1 0x00000080
|
||||
#define VIBEFLAG_QUATERFRAME_2 0x00000100
|
||||
#define VIBEFLAG_QUATERFRAME_3 0x00000200
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Weapon Defines
|
||||
#define WEAPON_LASER 0
|
||||
#define WEAPON_VAUSS 1
|
||||
#define WEAPON_MICROWAVE 2
|
||||
#define WEAPON_PLASMA 3
|
||||
#define WEAPON_FUSION 4
|
||||
#define WEAPON_SUPER_LASER 5
|
||||
#define WEAPON_MASSDRIVER 6
|
||||
#define WEAPON_NAPALM 7
|
||||
#define WEAPON_EMD 8
|
||||
#define WEAPON_OMEGA 9
|
||||
#define WEAPON_CONCUSSION 10
|
||||
#define WEAPON_HOMING 11
|
||||
#define WEAPON_IMPACTMORTAR 12
|
||||
#define WEAPON_SMART 13
|
||||
#define WEAPON_MEGA 14
|
||||
#define WEAPON_FRAG 15
|
||||
#define WEAPON_GUIDED 16
|
||||
#define WEAPON_NAPALMROCKET 17
|
||||
#define WEAPON_CYCLONE 18
|
||||
#define WEAPON_BLACKSHARK 19
|
||||
#define WEAPON_FLARE 20
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Functions
|
||||
|
||||
#define STDCALLFUNC __stdcall
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CEXTERN extern "C"
|
||||
#else
|
||||
#define CEXTERN
|
||||
#endif
|
||||
|
||||
// Called once, during initialization to initialize the IntelliVIBE device.
|
||||
// If initialization fails, then it should return 0, else return 1.
|
||||
CEXTERN int STDCALLFUNC IntelliVIBE_Initialize(d3_init_info *init_info);
|
||||
typedef int(STDCALLFUNC *IntelliVIBE_Initialize_fp)(d3_init_info *init_info);
|
||||
|
||||
// Called once when Descent 3 is about to shutdown, to do any final shutdown
|
||||
// procedures needed by the device.
|
||||
CEXTERN void STDCALLFUNC IntelliVIBE_Shutdown(void);
|
||||
typedef void(STDCALLFUNC *IntelliVIBE_Shutdown_fp)(void);
|
||||
|
||||
// Called once per frame during game play. This allows the device to perform
|
||||
// anything that needs to be done on a frame interval.
|
||||
CEXTERN void STDCALLFUNC IntelliVIBE_DoQuaterFrame(d3_intellivibe *frame_info);
|
||||
typedef void(STDCALLFUNC *IntelliVIBE_DoQuaterFrame_fp)(d3_intellivibe *frame_info);
|
||||
|
||||
#endif
|
@ -44,7 +44,6 @@
|
||||
#include "D3ForceFeedback.h"
|
||||
#include "player.h"
|
||||
#include "demofile.h"
|
||||
#include "vibeinterface.h"
|
||||
|
||||
// Global variables for physics system
|
||||
uint8_t Default_player_terrain_leveling = 0;
|
||||
@ -3039,8 +3038,6 @@ void phys_apply_force(object *obj, vector *force_vec, int16_t weapon_index) {
|
||||
}
|
||||
|
||||
// mprintf(0,"Force: Magnitude = %f Scale = %1.3f\n",magnitude,scale);
|
||||
|
||||
VIBE_DoForce(force_vec);
|
||||
}
|
||||
//------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user