diff --git a/rott/_w_wad.h b/rott/_w_wad.h index 876c3ac..4746e65 100644 --- a/rott/_w_wad.h +++ b/rott/_w_wad.h @@ -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 //=============== diff --git a/rott/develop.h b/rott/develop.h index fe769c2..a730c68 100644 --- a/rott/develop.h +++ b/rott/develop.h @@ -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 @@ -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 diff --git a/rott/isr.c b/rott/isr.c index e1db407..b9991b4 100644 --- a/rott/isr.c +++ b/rott/isr.c @@ -31,7 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include "rt_def.h" -#include "task_man.h" #include "isr.h" #include "_isr.h" #include "rt_in.h" diff --git a/rott/rt_battl.c b/rott/rt_battl.c index 5bc3a4c..852b5ff 100644 --- a/rott/rt_battl.c +++ b/rott/rt_battl.c @@ -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; @@ -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 } @@ -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 ) @@ -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 ) { @@ -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; @@ -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 ]++; @@ -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 ]++; @@ -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 ) @@ -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; } @@ -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() ) ) { @@ -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 ]; @@ -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 ) @@ -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 ) @@ -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 ); } @@ -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 @@ -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 } } diff --git a/rott/rt_in.c b/rott/rt_in.c index 1409efb..90f39fa 100644 --- a/rott/rt_in.c +++ b/rott/rt_in.c @@ -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" @@ -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 diff --git a/rott/rt_main.c b/rott/rt_main.c index f2b66f9..b67e7b6 100644 --- a/rott/rt_main.c +++ b/rott/rt_main.c @@ -105,10 +105,6 @@ boolean quiet = false; boolean DebugOk = false; -#if (WHEREAMI==1) -int programlocation=-1; -#endif - static boolean turbo; static int NoWait; @@ -401,15 +397,7 @@ void DrawRottTitle ( void ) memset (title,0,sizeof(title)); if (gamestate.Product == ROTT_SHAREWARE) - { -#if (DELUXE==1) - strcpy(title,"Lasersoft Deluxe Version"); -#elif (LOWCOST==1) - strcpy(title,"Episode One"); -#else strcpy(title,"Shareware Version"); -#endif - } else if (gamestate.Product == ROTT_SUPERCD) strcpy(title,"CD Version"); else if (gamestate.Product == ROTT_SITELICENSE) @@ -570,23 +558,6 @@ void CheckCommandLineParameters( void ) n = US_CheckParm(_argv[i],PStrings); switch(n) { -#if (TEDLAUNCH==1) - case 0: - tedlevelnum = ParseNum(_argv[i + 1]); - tedlevel=true; - if (i+3>=_argc) - { - tedx=0; - tedy=0; - } - else - { - tedx=ParseNum(_argv[i + 2]); - tedy=ParseNum(_argv[i + 3]); - } - MenuFixup (); - break; -#endif case 1: NoWait = true; break; @@ -622,15 +593,7 @@ void CheckCommandLineParameters( void ) printf ("Rise of the Triad (c) 1995 Apogee Software\n"); //MED if (gamestate.Product == ROTT_SHAREWARE) - { -#if (DELUXE==1) - printf("Lasersoft Deluxe "); -#elif (LOWCOST==1) - printf("Episode One "); -#else printf("Shareware "); -#endif - } else if (gamestate.Product == ROTT_SUPERCD) printf("CD "); else if (gamestate.Product == ROTT_SITELICENSE) @@ -992,8 +955,6 @@ void GameLoop (void) { int NextLevel; - wami(1); - while (1) { if ( playstate == ex_battledone ) @@ -1480,7 +1441,6 @@ void GameLoop (void) ; } } - waminot(); } boolean CheckForQuickLoad (void ) @@ -1611,12 +1571,9 @@ void UpdateGameObjects ( void ) objtype * ob,*temp; battle_status BattleStatus; - wami(2); - if (controlupdatestarted==0) { return; - waminot(); } atime=GetFastTics(); @@ -1707,9 +1664,6 @@ void UpdateGameObjects ( void ) FX_SetReverb( min( numareatiles[ player->areanumber ] >> 1, 90 ) ); } } - - waminot(); - } @@ -1766,9 +1720,6 @@ void PlayLoop boolean canquit = true; int quittime = 0; - wami(3); - - if ( (loadedgame == false) && (timelimitenabled == false) ) { gamestate.TimeCount = 0; @@ -1998,7 +1949,6 @@ void PlayLoop } } } - waminot(); } //****************************************************************************** @@ -2011,7 +1961,6 @@ void CheckRemoteRidicule ( int scancode ) { int num=-1; - wami(4); switch (scancode) { case sc_F1: @@ -2056,7 +2005,6 @@ void CheckRemoteRidicule ( int scancode ) AddRemoteRidiculeCommand ( consoleplayer, MSG_DIRECTED_TO_ALL, num ); LastScan=0; } - waminot(); } //****************************************************************************** @@ -2085,8 +2033,6 @@ void PollKeyboard { static char autopressed = false; - wami(5); - if (demoplayback==true) { IN_UpdateKeyboard(); @@ -2391,8 +2337,6 @@ void PollKeyboard if (Keystate[0x45] == 3) Keystate[0x45] = 0; } - - waminot(); } //**************************************************************************** diff --git a/rott/rt_main.h b/rott/rt_main.h index af514ed..c799aa0 100644 --- a/rott/rt_main.h +++ b/rott/rt_main.h @@ -144,10 +144,6 @@ void InitCharacter(void); void ShutDown ( void ); void UpdateGameObjects ( void ); -#if (WHEREAMI==1) -extern int programlocation; -#endif - extern int polltime; extern int oldpolltime; extern volatile int oldtime; diff --git a/rott/rt_net.c b/rott/rt_net.c index a766a41..558cfc2 100644 --- a/rott/rt_net.c +++ b/rott/rt_net.c @@ -571,8 +571,6 @@ void UpdateClientControls ( void ) else InUCC = true; - wami(6); - lastcontrolupdatetime=GetTicCount(); if (standalone==false) @@ -708,8 +706,6 @@ void UpdateClientControls ( void ) } InUCC = false; - - waminot(); } //**************************************************************************** @@ -739,7 +735,6 @@ boolean PlayerInGame ( int p ) //**************************************************************************** void CheckForPacket ( void ) { - wami(7); while (ReadPacket()==true) { if (badpacket==0) @@ -749,7 +744,6 @@ void CheckForPacket ( void ) else RequestPacket (LastCommandTime[rottcom->remotenode]+controldivisor, rottcom->remotenode, controldivisor); } - waminot(); } @@ -916,8 +910,6 @@ void PrepareLocalPacket ( void ) { MoveType * pkt; - wami(8); - pkt=(MoveType *)NextLocalCommand(); pkt->time=controlupdatetime; @@ -935,7 +927,6 @@ void PrepareLocalPacket ( void ) SendPacket (pkt, server); controlupdatetime+=controldivisor; - waminot(); } diff --git a/rott/rt_playr.c b/rott/rt_playr.c index f80778e..669dfe7 100644 --- a/rott/rt_playr.c +++ b/rott/rt_playr.c @@ -4623,9 +4623,8 @@ void CheckWeaponChange (objtype * ob) if ((ob->flags & FL_DOGMODE) || (ob->flags & FL_GODMODE)) return; -#if (WEAPONCHEAT==1) - if (godmode && Keyboard[sc_Insert]) - { + if (godmode && Keyboard[sc_Insert]) + { SD_Play(SD_SELECTWPNSND); // FOR DEBUG only @@ -4658,11 +4657,8 @@ void CheckWeaponChange (objtype * ob) //pstate->weapondowntics = WEAPONS[pstate->weapon].screenheight/GMOVE; //if ((ob==player) && SHOW_BOTTOM_STATUS_BAR() ) // DrawBarAmmo (false); - } + } else if (pstate->buttonstate[bt_swapweapon]) -#else - if (pstate->buttonstate[bt_swapweapon]) -#endif { if ((pstate->weapon == pstate->bulletweapon) && (pstate->missileweapon != -1)) diff --git a/rott/rt_vh_a.h b/rott/rt_vh_a.h deleted file mode 100644 index 565f501..0000000 --- a/rott/rt_vh_a.h +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright (C) 1994-1995 Apogee Software, Ltd. - -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 2 -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -#ifndef _rt_vh_a_public -#define _rt_vh_a_public - -//*************************************************************************** -// -// Public header for RT_VH_A.ASM. -// -//*************************************************************************** - -void VH_UpdateScreen (void); -void JoyStick_Vals (void); - -#endif diff --git a/rott/rt_vid.c b/rott/rt_vid.c index 6b170da..2709d54 100644 --- a/rott/rt_vid.c +++ b/rott/rt_vid.c @@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "rt_main.h" #include "z_zone.h" #include "lumpy.h" -#include "rt_vh_a.h" #include "isr.h" #include "rt_view.h" #include "cin_efct.h" diff --git a/rott/rt_vid.h b/rott/rt_vid.h index e01faf6..531e466 100644 --- a/rott/rt_vid.h +++ b/rott/rt_vid.h @@ -74,6 +74,8 @@ void VWB_TVlin (int y1, int y2, int x, boolean up); int VW_MarkUpdateBlock (int x1, int y1, int x2, int y2); void VW_UpdateScreen (void); +void VH_UpdateScreen (void); + void VL_FadeOut (int start, int end, int red, int green, int blue, int steps); void VL_FadeIn (int start, int end, byte *palette, int steps); void VL_DecompressLBM (lbm_t *lbminfo, boolean flip); diff --git a/rott/task_man.h b/rott/task_man.h deleted file mode 100644 index 37f7288..0000000 --- a/rott/task_man.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (C) 1994-1995 Apogee Software, Ltd. - -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 2 -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -/********************************************************************** - module: TASK_MAN.C - - author: James R. Dose - phone: (214)-271-1365 Ext #221 - date: July 25, 1994 - - Public header for TASK_MAN.C, a low level timer task scheduler. - - (c) Copyright 1994 James R. Dose. All Rights Reserved. -**********************************************************************/ - -#ifndef __TASK_MAN_H -#define __TASK_MAN_H - -enum TASK_ERRORS - { - TASK_Warning = -2, - TASK_Error = -1, - TASK_Ok = 0 - }; - -typedef struct task -{ - struct task *next; - struct task *prev; - void ( *TaskService )( struct task * ); - void *data; - long rate; - volatile long count; - int priority; - int active; -} task; - -// TS_InInterrupt is TRUE during a taskman interrupt. -// Use this if you have code that may be used both outside -// and within interrupts. - -extern volatile int TS_InInterrupt; - -void TS_Shutdown( void ); -task *TS_ScheduleTask( void ( *Function )( task * ), int rate, - int priority, void *data ); -int TS_Terminate( task *ptr ); -void TS_Dispatch( void ); -void TS_SetTaskRate( task *Task, int rate ); -void TS_UnlockMemory( void ); -int TS_LockMemory( void ); - -#endif diff --git a/rott/w_wad.c b/rott/w_wad.c index 91158b9..c6128a1 100644 --- a/rott/w_wad.c +++ b/rott/w_wad.c @@ -151,25 +151,6 @@ void W_AddFile (char *_filename) } } - - -/* -==================== -= -= W_CheckWADIntegrity -= -==================== -*/ - -void W_CheckWADIntegrity ( void ) -{ - -// CRC disabled because it's not very useful these days - -} - - - /* ==================== = @@ -212,7 +193,6 @@ void W_InitMultipleFiles (char **filenames) if (!quiet) printf("W_Wad: Wad Manager Started NUMLUMPS=%ld\n",(long)numlumps); - W_CheckWADIntegrity (); }