Removed old Tactile-code since ForceFeedback is currently out of question

This commit is contained in:
zicodxx 2007-07-22 02:01:02 +00:00
parent 196a1267ee
commit 928a542b88
11 changed files with 4 additions and 175 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20070722
--------
include/args.h, include/error.h, main/newmenu.c, main/network.c, main/inferno.c, main/menu.c, main/gamerend.c, main/automap.c, main/game.c, main/game.h, main/gamecntl.c, misc/args.c: Code cleanup and small fixes
main/collide.c, main/newmenu.c, main/object.c, main/physics.c, main/weapon.c, main/weapon.h, main/gameseq.c, main/laser.c, main/kconfig.c, main/gamecntl.c: Removed old Tactile-code since ForceFeedback is currently out of question
20070718
--------

View file

@ -79,10 +79,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "palette.h"
#include "gameseq.h"
#ifdef TACTILE
#include "tactile.h"
#endif
#ifdef EDITOR
#include "editor/editor.h"
#endif
@ -332,11 +328,6 @@ void collide_player_and_wall( object * playerobj, fix hitspeed, short hitseg, sh
force.z = 40*(d_rand() - 16384);
phys_apply_rot(playerobj, &force);
#ifdef TACTILE
if (TactileStick)
Tactile_apply_force (&force,&playerobj->orient);
#endif
//make sound
digi_link_sound_to_pos( SOUND_FORCEFIELD_BOUNCE_PLAYER, hitseg, 0, hitpt, 0, f1_0 );
#ifdef NETWORK
@ -347,16 +338,6 @@ void collide_player_and_wall( object * playerobj, fix hitspeed, short hitseg, sh
}
else {
#ifdef TACTILE
vms_vector force;
if (TactileStick) {
force.x = -playerobj->mtype.phys_info.velocity.x;
force.y = -playerobj->mtype.phys_info.velocity.y;
force.z = -playerobj->mtype.phys_info.velocity.z;
Tactile_do_collide(&force, &playerobj->orient);
}
#endif
wall_hit_process( &Segments[hitseg], hitwall, 20, playerobj->id, playerobj );
}
@ -439,11 +420,6 @@ int check_volatile_wall(object *obj,int segnum,int sidenum,vms_vector *hitpt)
if (!(Players[Player_num].flags & PLAYER_FLAGS_INVULNERABLE))
apply_damage_to_player( obj, obj, damage );
#ifdef TACTILE
if (TactileStick)
Tactile_Xvibrate (50,25);
#endif
PALETTE_FLASH_ADD(f2i(damage*4), 0, 0); //flash red
}
@ -455,11 +431,6 @@ int check_volatile_wall(object *obj,int segnum,int sidenum,vms_vector *hitpt)
}
else
{
#ifdef TACTILE
if (TactileStick && !(FrameCount & 15))
Tactile_Xvibrate_clear ();
#endif
return 0;
}
}

View file

@ -88,10 +88,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "songs.h"
#endif
#if defined (TACTILE)
#include "tactile.h"
#endif
#include "multi.h"
#include "desc_id.h"
#include "cntrlcen.h"
@ -443,10 +439,6 @@ int do_game_pause()
if (Game_paused) { //unpause!
Game_paused=0;
#if defined (TACTILE)
if (TactileStick)
EnableForces();
#endif
return KEY_PAUSE;
}
@ -480,11 +472,6 @@ int do_game_pause()
Game_paused=1;
#if defined (TACTILE)
if (TactileStick)
DisableForces();
#endif
// set_screen_mode( SCREEN_MENU );
set_popup_screen();
gr_palette_load( gr_palette );

View file

@ -113,10 +113,6 @@ char gameseq_rcsid[] = "$Id: gameseq.c,v 1.1.1.1 2006/03/17 19:57:54 zicodxx Exp
#include "credits.h"
#include "gamemine.h"
#if defined (TACTILE)
#include "tactile.h"
#endif
#ifdef EDITOR
#include "editor/editor.h"
#endif
@ -435,11 +431,6 @@ void init_player_stats_level(int secret_flag)
init_gauges();
#ifdef TACTILE
if (TactileStick)
tactile_set_button_jolt();
#endif
Missile_viewer = NULL;
}
@ -506,14 +497,6 @@ void init_player_stats_new_ship()
Missile_viewer=NULL; ///reset missile camera if out there
#ifdef TACTILE
if (TactileStick)
{
tactile_set_button_jolt();
}
#endif
init_ai_for_ship();
}
@ -968,11 +951,6 @@ void DoEndLevelScoreGlitz(int network)
set_screen_mode(SCREEN_MENU); //go into menu mode
#ifdef TACTILE
if (TactileStick)
ClearForces();
#endif
mprintf((0,"DoEndLevelScoreGlitz\n"));
// Compute level player is on, deal with secret levels (negative numbers)

View file

@ -62,9 +62,6 @@ static char rcsid[] = "$Id: kconfig.c,v 1.1.1.1 2006/03/17 19:57:17 zicodxx Exp
#include "lighting.h"
#include "ai.h"
#include "cntrlcen.h"
#if defined (TACTILE)
#include "tactile.h"
#endif
#include "collide.h"
#ifdef GP2X

View file

@ -66,10 +66,6 @@ char laser_rcsid[] = "$Id: laser.c,v 1.1.1.1 2006/03/17 19:55:16 zicodxx Exp $";
#include "physics.h"
#include "multi.h"
#ifdef TACTILE
#include "tactile.h"
#endif
int Laser_rapid_fire = 0;
object *Guided_missile[MAX_PLAYERS]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};

View file

@ -81,10 +81,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "ogl_init.h"
#endif
#if defined (TACTILE)
#include "tactile.h"
#endif
#ifdef GP2X
#include "gp2x.h"
#endif
@ -731,10 +727,6 @@ int newmenu_do4( char * title, char * subtitle, int nitems, newmenu_item * item,
{
time_stopped = 1;
stop_time();
#ifdef TACTILE
if (TactileStick)
DisableForces();
#endif
}
save_canvas = grd_curcanv;
@ -939,11 +931,7 @@ int newmenu_do4( char * title, char * subtitle, int nitems, newmenu_item * item,
#ifndef OGL
if ( filename == NULL ) {
// Save the background under the menu...
#ifdef TACTILE
if (TactileStick)
DisableForces();
#endif
bg.saved = gr_create_bitmap( w+MENSCALE_X, h+MENSCALE_Y );
Assert( bg.saved != NULL );
@ -1827,10 +1815,6 @@ int newmenu_do4( char * title, char * subtitle, int nitems, newmenu_item * item,
if (time_stopped)
{
start_time();
#ifdef TACTILE
if (TactileStick)
EnableForces();
#endif
}
if ( sound_stopped )

View file

@ -78,10 +78,6 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "switch.h"
#include "gameseq.h"
#ifdef TACTILE
#include "tactile.h"
#endif
#ifdef EDITOR
#include "editor/editor.h"
#endif
@ -1639,12 +1635,6 @@ void dead_player_frame(void)
else
HUD_init_message(TXT_SHIP_DESTROYED_0);
#ifdef TACTILE
if (TactileStick)
{
ClearForces();
}
#endif
Player_exploded = 1;
#ifdef NETWORK
if (Game_mode & GM_NETWORK)
@ -1770,10 +1760,6 @@ void start_player_death_sequence(object *player)
PaletteRedAdd = 40;
Player_is_dead = 1;
#ifdef TACTILE
if (TactileStick)
Buffeting (70);
#endif
//Players[Player_num].flags &= ~(PLAYER_FLAGS_AFTERBURNER);

View file

@ -50,10 +50,6 @@ static char rcsid[] = "$Id: physics.c,v 1.1.1.1 2006/03/17 19:55:30 zicodxx Exp
#include "bm.h"
#include "player.h"
#ifdef TACTILE
#include "tactile.h"
#endif
//Global variables for physics system
#define ROLL_RATE 0x2000
@ -805,10 +801,6 @@ void do_physics_sim(object *obj)
break;
}
case HIT_NONE:
#ifdef TACTILE
if (TactileStick && obj==ConsoleObject && !(FrameCount & 15))
Tactile_Xvibrate_clear ();
#endif
break;
#ifndef NDEBUG
@ -959,11 +951,6 @@ void phys_apply_force(object *obj,vms_vector *force_vec)
if (obj->movement_type != MT_PHYSICS)
return;
#ifdef TACTILE
if (TactileStick && obj==&Objects[Players[Player_num].objnum])
Tactile_apply_force (force_vec,&obj->orient);
#endif
//Add in acceleration due to force
vm_vec_scale_add2(&obj->mtype.phys_info.velocity,force_vec,fixdiv(f1_0,obj->mtype.phys_info.mass));

View file

@ -47,10 +47,6 @@ static char rcsid[] = "$Id: weapon.c,v 1.1.1.1 2006/03/17 19:57:36 zicodxx Exp $
#include "ai.h"
#include "args.h"
#if defined (TACTILE)
#include "tactile.h"
#endif
int POrderList (int num);
int SOrderList (int num);
// Note, only Vulcan cannon requires ammo.
@ -290,10 +286,6 @@ void select_weapon(int weapon_num, int secondary_flag, int print_message, int wa
}
Primary_weapon = weapon_num;
weapon_name = PRIMARY_WEAPON_NAMES(weapon_num);
#if defined (TACTILE)
tactile_set_button_jolt();
#endif
//save flag for whether was super version
Primary_last_was_super[weapon_num % SUPER_WEAPON] = (weapon_num >= SUPER_WEAPON);
@ -433,10 +425,6 @@ void auto_select_weapon(int weapon_type)
if (!Cycling)
{
HUD_init_message(TXT_NO_PRIMARY);
#ifdef TACTILE
if (TactileStick)
ButtonReflexClear(0);
#endif
select_weapon(0, 0, 0, 1);
}
else
@ -462,11 +450,6 @@ void auto_select_weapon(int weapon_type)
if (!Cycling)
{
HUD_init_message(TXT_NO_PRIMARY);
#ifdef TACTILE
if (TactileStick)
ButtonReflexClear(0);
#endif
// if (POrderList(0)<POrderList(255))
select_weapon(0, 0, 0, 1);
}
@ -641,7 +624,7 @@ void ReorderPrimary ()
{
m[i].type=NM_TYPE_MENU;
if (PrimaryOrder[i]==255)
m[i].text="ˆˆˆˆˆˆˆ Never autoselect ˆˆˆˆˆˆˆ";
m[i].text="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Never autoselect <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
else
m[i].text=(char *)PRIMARY_WEAPON_NAMES(PrimaryOrder[i]);
m[i].value=PrimaryOrder[i];
@ -663,7 +646,7 @@ void ReorderSecondary ()
{
m[i].type=NM_TYPE_MENU;
if (SecondaryOrder[i]==255)
m[i].text="ˆˆˆˆˆˆˆ Never autoselect ˆˆˆˆˆˆˆ";
m[i].text="<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Never autoselect <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
else
m[i].text=(char *)SECONDARY_WEAPON_NAMES(SecondaryOrder[i]);
m[i].value=SecondaryOrder[i];
@ -1270,46 +1253,6 @@ void do_seismic_stuff(void)
}
int tactile_fire_duration[]={120,80,150,250,150,200,100,180,280,100};
int tactile_fire_repeat[]={260,90,160,160,160,210,110,191,291,111};
void tactile_set_button_jolt ()
{
#ifdef TACTILE
FILE *infile;
int t,i;
static int stickmag=-1;
int dur,rep;
dur=tactile_fire_duration[Primary_weapon];
rep=tactile_fire_repeat[Primary_weapon];
if (TactileStick)
{
if (stickmag==-1)
{
if (t=FindArg("-stickmag"))
stickmag=atoi (Args[t+1]);
else
stickmag=50;
infile=(FILE *)fopen ("stick.val","rt");
if (infile!=NULL)
{
for (i=0;i<10;i++)
{
fscanf (infile,"%d %d\n",&tactile_fire_duration[i],&tactile_fire_repeat[i]);
mprintf ((0,"scan value[%d]=%d\n",i,tactile_fire_duration[i]));
}
fclose (infile);
}
}
ButtonReflexJolt (0,stickmag,0,dur,rep);
}
#endif
}
/*
* reads n weapon_info structs from a CFILE
*/

View file

@ -226,7 +226,6 @@ extern int spit_powerup(object *spitter, int id, int seed);
extern void rock_the_mine_frame(void);
extern void smega_rock_stuff(void);
extern void init_smega_detonates(void);
extern void tactile_set_button_jolt (void);
/*
* reads n weapon_info structs from a CFILE