Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rock'n Ride removal #292

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Descent3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ set(HEADERS
robotfire.h
robotfirestruct.h
robotfirestruct_external.h
rocknride.h
room.h
room_external.h
scorch.h
Expand Down Expand Up @@ -244,7 +243,6 @@ set(CPPS
render.cpp
renderobject.cpp
robotfire.cpp
rocknride.cpp
room.cpp
scorch.cpp
screens.cpp
Expand Down
5 changes: 0 additions & 5 deletions Descent3/Controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,6 @@
#include "sounds.h"
#include "soundload.h"

#include "rocknride.h"

#include <stdlib.h>
#include <memory.h>

Expand Down Expand Up @@ -740,9 +738,6 @@ void ReadPlayerControls(game_controls *controls) {
DoMisc(controls);
DoMovement(controls); // controls for moving the object

// Do any rock'n'ride updates
RNR_UpdateControllerInfo(controls);

// only read at the specified rate to keep things consistant. manager control system timer
// Control_current_time += Frametime;
// Control_frametime = Control_current_time - Control_interval_time;
Expand Down
21 changes: 0 additions & 21 deletions Descent3/D3ForceFeedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
#include "weapon.h"
#include "ddio.h"
#include "psrand.h"
#include "rocknride.h"

extern float Gametime;

Expand Down Expand Up @@ -360,10 +359,6 @@ void ForceEffectsClose(void) { ddio_ffb_DestroyAll(); }
// Plays an effect
// -----------------------------------------------------------------
void ForceEffectsPlay(int id, float *scale, int *direction) {
if (RocknRide_enabled && direction) {
RNR_UpdateForceFeedbackInfo((scale) ? *scale : 1.0f, direction);
}

if (!D3Force_init || !D3Use_force_feedback)
return;

Expand All @@ -389,10 +384,6 @@ void ForceEffectsPlay(int id, float *scale, int *direction) {
ddio_ffb_effectPlay(low_id);
}
void ForceEffectsPlay(int id, float *scale, vector *direction) {
if (RocknRide_enabled && direction) {
RNR_UpdateForceFeedbackInfo((scale) ? *scale : 1.0f, direction);
}

if (!D3Force_init || !D3Use_force_feedback)
return;

Expand Down Expand Up @@ -437,9 +428,6 @@ void ForceEffectsPlay(int id, float *scale, vector *direction) {
}

void DoForceForWeapon(object *me_obj, object *it_obj, vector *force_vec) {
if (!RocknRide_enabled && (!D3Force_init || !D3Use_force_feedback))
return;

if (it_obj->id < 0 || it_obj->id >= MAX_WEAPONS)
return;

Expand All @@ -462,9 +450,6 @@ void DoForceForWeapon(object *me_obj, object *it_obj, vector *force_vec) {
}

void DoForceForWall(object *playerobj, float hitspeed, int hitseg, int hitwall, vector *wall_normal) {
if (!RocknRide_enabled && (!D3Force_init || !D3Use_force_feedback))
return;

vector local_norm;
float scale = 1.00f;

Expand All @@ -484,9 +469,6 @@ void DoForceForWall(object *playerobj, float hitspeed, int hitseg, int hitwall,
}

void DoForceForRecoil(object *playerobj, object *weap) {
if (!RocknRide_enabled && (!D3Force_init || !D3Use_force_feedback))
return;

weapon *w_ptr = &Weapons[weap->id];

vector local_norm;
Expand All @@ -513,9 +495,6 @@ void DoForceForRecoil(object *playerobj, object *weap) {
float Force_time_since_last_shake;
#define SHAKE_TIME 0.2f
void DoForceForShake(float magnitude) {
if (!RocknRide_enabled && (!D3Force_init || !D3Use_force_feedback))
return;

if (Force_time_since_last_shake + SHAKE_TIME > Gametime) {
if (Force_time_since_last_shake < Gametime) {
return;
Expand Down
6 changes: 0 additions & 6 deletions Descent3/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,6 @@
#include "config.h"
#include "osiris_dll.h"
#include "gamesequence.h"
#include "rocknride.h"
#include "vibeinterface.h"


Expand Down Expand Up @@ -2078,11 +2077,6 @@ void InitiatePlayerDeath(object *playerobj, bool melee, int fate) {

// Start the death sequence
StartPlayerDeath(playerobj->id, -playerobj->shields, melee, fate);

// Send the Game status to the rock'n'ride chair
if (playerobj->id == Player_num) {
RNR_UpdateGameStatus(RNRGSC_PLAYERDIES);
}
}
}

Expand Down
2 changes: 0 additions & 2 deletions Descent3/gamesequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,6 @@
#include "debuggraph.h"
#include "multi_dll_mgr.h"
#include "multi_ui.h"
#include "rocknride.h"
#include "gamepath.h"
#include "vclip.h"
#include "bsp.h"
Expand Down Expand Up @@ -2047,7 +2046,6 @@ void RunGameMenu() {
NewUIWindow_alpha = 226;
SetUICallback(GameFrameUI);
SuspendControls();
RNR_UpdateGameStatus(RNRGSC_INMENU);

// reset bail flag.
Multi_bail_ui_menu = false;
Expand Down
11 changes: 0 additions & 11 deletions Descent3/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,6 @@
#include "marker.h"
#include "gamecinematics.h"
#include "debuggraph.h"
#include "rocknride.h"
#include "vibeinterface.h"

// Uncomment this for all non-US versions!!
Expand Down Expand Up @@ -1597,16 +1596,6 @@ void InitIOSystems(bool editor) {
Error("I/O initialization failed.");
}

int rocknride_arg = FindArg("-rocknride");
if (rocknride_arg) {
int comm_port = atoi(GameArgs[rocknride_arg + 1]);
if (!RNR_Initialize(comm_port)) {
mprintf((0, "Rock'n'Ride Init failed!\n"));
} else {
mprintf((0, "Rock'n'Ride Init success!\n"));
}
}

rtp_Init();
RTP_ENABLEFLAGS(RTI_FRAMETIME | RTI_RENDERFRAMETIME | RTI_MULTIFRAMETIME | RTI_MUSICFRAMETIME |
RTI_AMBSOUNDFRAMETIME);
Expand Down
1 change: 0 additions & 1 deletion Descent3/lnxmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ static cmdLineArg d3ArgTable[] = {

{"glidelibrary", 'l', "Select Glide rendering library."},
{"gllibrary", 'g', "Select OpenGL rendering library."},
{"rocknride", 'r', "Enable Rock'n'Ride (http://www.rocknride.com)."},
{"cobra", 'R', "Enable Cobra chair support."},

#if (!defined(DEMO))
Expand Down
Loading