Skip to content

Commit

Permalink
Remove old & confusing macros + files (#54)
Browse files Browse the repository at this point in the history
* Remove DELUXE, LOWCOST, WADCHECKSUM macros

* Remove WHEREAMI and associated dead calls

* Remove TEDLAUNCH macro

* Remove WEAPONCHEAT macro

* Remove BATTLEINFO macro

* Remove BATTLECHECK macro

* Hopefully fix indentation warning

* Remove dead function W_CheckWADIntegrity()

* Remove unused header task_man.h

* Remove rt_vh_a.h and JoyStick_Vals()
  • Loading branch information
erysdren committed Apr 13, 2024
1 parent cb6cfe7 commit 326cb4a
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 371 deletions.
17 changes: 0 additions & 17 deletions rott/_w_wad.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#define CHECKPERIOD 20


#if ( SHAREWARE == 1 )

#if ( DELUXE == 1)
#define WADCHECKSUM (54748)
#elif ( LOWCOST == 1)
#define WADCHECKSUM (12185)
#else
#define WADCHECKSUM (20567)
#endif

#else

#define WADCHECKSUM (24222)

#endif

//===============
// TYPES
//===============
Expand Down
33 changes: 0 additions & 33 deletions rott/develop.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _develop_public
#define _develop_public

#define WEAPONCHEAT 1
#define BATTLECHECK 0 // This should be turned off for release, on for beta
#define BATTLEINFO 0 // This should be turned off for release

#define DELUXE 0
#define LOWCOST 0

#define BNACRASHPREVENT 1 //bna added
// Flavor selection (shareware, registered, cd version, site license) has moved to the Makefile
#ifndef SHAREWARE
Expand All @@ -38,32 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

// okay?

#define TEDLAUNCH 0
#define SOFTERROR 0
#define WHEREAMI 0




#if (WHEREAMI==1)

#define wami(val) \
{ \
programlocation=val;\
}

#define waminot()
/*
{ \
programlocation=-1;\
}
*/

#else

#define wami(val)
#define waminot()

#endif

#endif
1 change: 0 additions & 1 deletion rott/isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdio.h>

#include "rt_def.h"
#include "task_man.h"
#include "isr.h"
#include "_isr.h"
#include "rt_in.h"
Expand Down
115 changes: 0 additions & 115 deletions rott/rt_battl.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,6 @@ void BATTLE_Init
int team;
int TeamNumber[ MAXPLAYERCOLORS ];

#if (BATTLECHECK == 1)
if ( ( gamestate.teamplay ) && ( BattleMode == battle_Tag ) )
{
Error( "BATTLE_Init : Cannot play Tag in team mode.\n" );
}

if ( ( gamestate.teamplay ) && ( BattleMode == battle_CaptureTheTriad ) )
{
Error( "BATTLE_Init : Can only play Capture the Triad in team mode.\n" );
}
#endif

Timer = 0;
RoundOver = false;

Expand Down Expand Up @@ -380,21 +368,6 @@ void BATTLE_Init

BATTLE_StartRound();

#if (BATTLEINFO == 1)
SoftError( "GRAVITY = %d\n", GRAVITY );
SoftError( "BO_Gravity = %d\n", BattleOptions.Gravity );
SoftError( "BO_Speed = %d\n", BattleOptions.Speed );
SoftError( "BO_Ammo = %d\n", BattleOptions.Ammo );
SoftError( "BO_HitPoints = %d\n", BattleOptions.HitPoints );
SoftError( "BO_Dangers = %d\n", BattleOptions.SpawnDangers );
SoftError( "BO_Health = %d\n", BattleOptions.SpawnHealth );
SoftError( "BO_Weapons = %d\n", BattleOptions.SpawnWeapons );
SoftError( "BO_Respawn = %d\n", BattleOptions.RespawnItems );
SoftError( "BO_Light = %d\n", BattleOptions.LightLevel );
SoftError( "BO_Kills = %d\n", BattleOptions.Kills );
SoftError( "BO_DangerDam = %d\n", BattleOptions.DangerDamage );
SoftError( "BO_TimeLimit = %d\n", BattleOptions.TimeLimit );
#endif
}


Expand Down Expand Up @@ -594,12 +567,7 @@ battle_status BATTLE_CheckGameStatus

if ( ( player < 0 ) || ( player >= MAXPLAYERS ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus - reason %d : Player out of range!\n",
reason );
#else
return( battle_no_event );
#endif
}

if ( !BATTLEMODE )
Expand Down Expand Up @@ -653,10 +621,6 @@ battle_status BATTLE_CheckGameStatus
break;

case battle_player_killed :
#if (BATTLEINFO == 1)
SoftError( "BATTLE_CheckGameStatus: Player %d Died", player );
SoftError( "---ticks = %d\n", Timer );
#endif

switch( BattleMode )
{
Expand Down Expand Up @@ -688,11 +652,7 @@ battle_status BATTLE_CheckGameStatus
if ( ( BattleMode != battle_Collector ) &&
( BattleMode != battle_Scavenger ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus : Got collector item on wrong battle mode!" );
#else
return( battle_no_event );
#endif
}
BATTLE_Points[ team ]++;
UpdateKills = true;
Expand All @@ -713,11 +673,7 @@ battle_status BATTLE_CheckGameStatus

if ( BattleMode != battle_Eluder )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus : Caught Eluder on non-Eluder battle mode!" );
#else
return( battle_no_event );
#endif
}

BATTLE_Points[ team ]++;
Expand All @@ -740,11 +696,7 @@ battle_status BATTLE_CheckGameStatus

if ( BattleMode != battle_Deluder )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus : Shot Eluder on non-Eluder battle mode!" );
#else
return( battle_no_event );
#endif
}

BATTLE_Points[ team ]++;
Expand All @@ -762,11 +714,7 @@ battle_status BATTLE_CheckGameStatus
case battle_captured_triad :
if ( BattleMode != battle_CaptureTheTriad )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus : Triad Captured on invalid battle mode!" );
#else
return( battle_no_event );
#endif
}

if ( consoleplayer == player )
Expand All @@ -786,12 +734,7 @@ battle_status BATTLE_CheckGameStatus
break;

default :
#if (BATTLECHECK == 1)
Error( "BATTLE_CheckGameStatus called with a reason of %d.",
reason );
#else
return( battle_no_event );
#endif
break;
}

Expand Down Expand Up @@ -856,14 +799,6 @@ void BATTLE_SortPlayerRanks
}
}

#if (BATTLEINFO == 1)
for( i = 0; i < BATTLE_NumberOfTeams; i++ )
{
SoftError( "Sorted rank %d = player %d : Score = %d\n", i,
BATTLE_PlayerOrder[ i ], BATTLE_Points[ BATTLE_PlayerOrder[ i ] ] );
}
#endif

if ( ( SwapFlag == true ) && ( gamestate.ShowScores ) &&
( SHOW_TOP_STATUS_BAR() || SHOW_KILLS() ) )
{
Expand Down Expand Up @@ -891,42 +826,19 @@ battle_status BATTLE_PlayerKilledPlayer
int killerteam;
int victimteam;

#if (BATTLEINFO == 1)
SoftError( "PlayerKilledPlayer:\nMode = %d\n", BattleMode );
SoftError( "Reason = %d\n", reason );
SoftError( "killer = %d, team = %d\n", killer, killerteam );
SoftError( "victim = %d, team = %d\n", victim, victimteam );
SoftError( "---ticks = %d\n", Timer );
#endif

if ( ( killer < 0 ) || ( killer >= MAXPLAYERS ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer - reason %d : Killer out of range!\n",
reason );
#else
return( battle_no_event );
#endif
}
if ( ( victim < 0 ) || ( victim >= MAXPLAYERS ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer - reason %d : Victim out of range!\n",
reason );
#else
return( battle_no_event );
#endif
}

if ( ( killer == victim ) && ( reason != battle_kill_with_missile ) &&
( reason != battle_kill_with_missile_in_air ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer : Player "
"killed self with illegal reason of %d.", reason );
#else
return( battle_no_event );
#endif
}

killerteam = BATTLE_Team[ killer ];
Expand All @@ -935,12 +847,7 @@ battle_status BATTLE_PlayerKilledPlayer
if ( ( killerteam < 0 ) || ( killerteam >= BATTLE_NumberOfTeams ) ||
( victimteam < 0 ) || ( victimteam >= BATTLE_NumberOfTeams ) )
{
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer - reason %d : Team out of range!\n",
reason );
#else
return( battle_no_event );
#endif
}

if ( !BATTLEMODE )
Expand Down Expand Up @@ -981,12 +888,7 @@ battle_status BATTLE_PlayerKilledPlayer
break;

default :
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer called with a reason of %d.",
reason );
#else
return( battle_no_event );
#endif
}

if ( killerteam == victimteam )
Expand Down Expand Up @@ -1020,13 +922,6 @@ battle_status BATTLE_PlayerKilledPlayer
status = battle_end_game;
}
}
#if (BATTLECHECK == 1)
else if ( reason != battle_kill_by_crushing )
{
Error( "BATTLE_PlayerKilledPlayer - reason %d : "
"Illegal reason in Tag!\n", reason );
}
#endif

return( status );
}
Expand Down Expand Up @@ -1058,12 +953,7 @@ battle_status BATTLE_PlayerKilledPlayer
}
break;
default :
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer called with a "
"reason of %d in Hunter.", reason );
#else
;
#endif
}
}
else
Expand Down Expand Up @@ -1098,12 +988,7 @@ battle_status BATTLE_PlayerKilledPlayer
break;

default :
#if (BATTLECHECK == 1)
Error( "BATTLE_PlayerKilledPlayer called with a reason of %d.",
reason );
#else
return( battle_no_event );
#endif
}
}

Expand Down
7 changes: 0 additions & 7 deletions rott/rt_in.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "_rt_in.h"
#include "isr.h"
#include "rt_util.h"
#include "rt_vh_a.h"
#include "rt_cfg.h"
#include "rt_msg.h"
#include "rt_playr.h"
Expand Down Expand Up @@ -521,12 +520,6 @@ void IN_GetJoyAbs (unsigned short joy, unsigned short *xp, unsigned short *yp)
*yp = Joy_y;
}

void JoyStick_Vals (void)
{

}


//******************************************************************************
//
// INL_GetJoyDelta () - Returns the relative movement of the specified
Expand Down
Loading

0 comments on commit 326cb4a

Please sign in to comment.