From 928a542b88f0b67b50669eb7a37b66529f276b07 Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Sun, 22 Jul 2007 02:01:02 +0000 Subject: [PATCH] Removed old Tactile-code since ForceFeedback is currently out of question --- CHANGELOG.txt | 1 + main/collide.c | 29 ----------------------- main/gamecntl.c | 13 ----------- main/gameseq.c | 22 ------------------ main/kconfig.c | 3 --- main/laser.c | 4 ---- main/newmenu.c | 18 +-------------- main/object.c | 14 ------------ main/physics.c | 13 ----------- main/weapon.c | 61 ++----------------------------------------------- main/weapon.h | 1 - 11 files changed, 4 insertions(+), 175 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 351e57a68..857107b76 100755 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 -------- diff --git a/main/collide.c b/main/collide.c index 6e8d8874a..fe87a1c42 100755 --- a/main/collide.c +++ b/main/collide.c @@ -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; } } diff --git a/main/gamecntl.c b/main/gamecntl.c index b4ef03582..e856a8a5e 100755 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -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 ); diff --git a/main/gameseq.c b/main/gameseq.c index 2bd2350bc..15369744c 100755 --- a/main/gameseq.c +++ b/main/gameseq.c @@ -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) diff --git a/main/kconfig.c b/main/kconfig.c index 487db5e6a..6abd226d3 100755 --- a/main/kconfig.c +++ b/main/kconfig.c @@ -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 diff --git a/main/laser.c b/main/laser.c index 00e273738..0363ccc10 100755 --- a/main/laser.c +++ b/main/laser.c @@ -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}; diff --git a/main/newmenu.c b/main/newmenu.c index aeaac2c8a..b3f59a641 100644 --- a/main/newmenu.c +++ b/main/newmenu.c @@ -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 ) diff --git a/main/object.c b/main/object.c index a904b5b5e..8fd27be09 100755 --- a/main/object.c +++ b/main/object.c @@ -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); diff --git a/main/physics.c b/main/physics.c index c5ad37d45..e58d72dbd 100755 --- a/main/physics.c +++ b/main/physics.c @@ -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)); diff --git a/main/weapon.c b/main/weapon.c index f7f17e9cd..177b94c21 100755 --- a/main/weapon.c +++ b/main/weapon.c @@ -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)