Skip to content

Commit

Permalink
Clean up some ISR functions (#79)
Browse files Browse the repository at this point in the history
and delete sbconfig.h
  • Loading branch information
erysdren authored Jul 21, 2024
1 parent aba5817 commit a65f4dc
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 230 deletions.
48 changes: 0 additions & 48 deletions rott/isr.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ volatile int Keytail;

volatile boolean PausePressed = false;
volatile boolean PanicPressed = false;
int KeyboardStarted=false;

const int ASCIINames[] = // Unshifted ASCII for scan codes
{
Expand Down Expand Up @@ -106,20 +105,6 @@ void ISR_SetTime(int settime)
ticbase = settime;
}

/* developer-only */

int GetFastTics (void)
{
/* STUB_FUNCTION; */

return 0;
}

void SetFastTics (int settime)
{
/* STUB_FUNCTION; */
}

/*
================
=
Expand All @@ -140,36 +125,3 @@ void I_Delay ( int delay )
IN_UpdateKeyboard();
}
}

/*
===============
=
= I_StartupTimer
=
===============
*/

void I_StartupTimer (void)
{
}

void I_ShutdownTimer (void)
{
}

/*
===============
=
= I_StartupKeyboard
=
===============
*/

void I_StartupKeyboard (void)
{
}


void I_ShutdownKeyboard (void)
{
}
20 changes: 3 additions & 17 deletions rott/isr.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,15 @@ extern volatile int Keytail;
extern volatile int Keyboard[MAXKEYBOARDSCAN]; // Keyboard status array
extern volatile int Keystate[MAXKEYBOARDSCAN]; // Keyboard state array

int GetTicCount (void);
int GetFastTics (void);

void SetFastTics(int);

extern int KeyboardStarted;
int GetTicCount(void);

extern const int ASCIINames[]; // Ascii -> scan code conversion
extern const int ShiftNames[]; // Shifted Ascii->scancode conversion
extern volatile boolean PausePressed; //Game paused variable
extern volatile boolean PanicPressed; //Panic key variable

void I_StartupTimer (void); // Start up timer isr
void I_SetTimer0(int speed); // Set the timer to a given speed
void I_ShutdownTimer (void); // Shutdown timer isr
void I_SetKeyboardLEDs( int which, boolean val ); // Turns LED's on or off
void I_StartupKeyboard (void); // Startup Keyboard isr
void I_ShutdownKeyboard (void); // Shutdown keyboard isr
void I_Delay ( int delay );
void I_Delay(int delay);
void ISR_SetTime(int settime);
void I_SendKeyboardData
(
int val
);
void I_SendKeyboardData(int val);

#endif
15 changes: 0 additions & 15 deletions rott/rt_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ static visobj_t * sortedvislist[MAXVISIBLE];

static const fixed mindist = 0x1000;

static int walltime=0;

static int weaponbobx, weaponboby;

static int pretics[3];
Expand Down Expand Up @@ -2002,14 +2000,12 @@ void TransformPushWalls( void )

void WallRefresh (void)
{
volatile int dtime;
int mag;
int yzangle;

whereami=16;
firstcoloffset=(firstcoloffset+(tics<<8))&65535;

dtime=GetFastTics();
if (missobj)
{
viewangle=missobj->angle;
Expand Down Expand Up @@ -2110,8 +2106,6 @@ void WallRefresh (void)
UpdateClientControls();
DrawWalls();
UpdateClientControls();
walltime=GetFastTics()-dtime;

}


Expand Down Expand Up @@ -2888,20 +2882,11 @@ void ScaleAndRotateBuffer (int startangle, int endangle, int startscale, int end

void RotateBuffer (int startangle, int endangle, int startscale, int endscale, int time)
{
int savetics;

//save off fastcounter

savetics=GetFastTics();

StartupRotateBuffer (0);

ScaleAndRotateBuffer (startangle, endangle, startscale, endscale, time);

ShutdownRotateBuffer ();

// restore fast counter
SetFastTics(savetics);
}


Expand Down
18 changes: 0 additions & 18 deletions rott/rt_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,6 @@ int main (int argc, char *argv[])
printf("\n< Press any key to continue >\n");
getch();
}
I_StartupTimer();
I_StartupKeyboard();
locplayerstate = &PLAYERSTATE[consoleplayer];

if (standalone==true)
Expand Down Expand Up @@ -1497,10 +1495,8 @@ void ShutDown ( void )
// }

ShutdownClientControls();
I_ShutdownKeyboard();
ShutdownGameCommands();
MU_Shutdown();
I_ShutdownTimer();
SD_Shutdown();
IN_Shutdown ();
ShutdownSoftError ();
Expand Down Expand Up @@ -1584,7 +1580,6 @@ void InitCharacter
void UpdateGameObjects ( void )
{
int j;
volatile int atime;
objtype * ob,*temp;
battle_status BattleStatus;

Expand All @@ -1593,8 +1588,6 @@ void UpdateGameObjects ( void )
return;
}

atime=GetFastTics();

UpdateClientControls ();

if (demoplayback == false)
Expand Down Expand Up @@ -1666,7 +1659,6 @@ void UpdateGameObjects ( void )
if (GamePaused==true)
break;
}
actortime=GetFastTics()-atime;

UpdateClientControls ();

Expand Down Expand Up @@ -1732,7 +1724,6 @@ void PlayLoop
)

{
volatile int atime;

boolean canquit = true;
int quittime = 0;
Expand All @@ -1758,10 +1749,7 @@ void PlayLoop
DoLoadGameSequence();
}

drawtime = 0;
actortime = 0;
tics = 0;
SetFastTics(0);

if ( fizzlein == false )
{
Expand Down Expand Up @@ -1795,8 +1783,6 @@ void PlayLoop
{
PauseLoop();

atime = GetFastTics();

if ( RefreshPause )
{
ThreeDRefresh();
Expand All @@ -1811,15 +1797,11 @@ void PlayLoop
if (controlupdatestarted == 1)
UpdateGameObjects();

atime = GetFastTics();

ThreeDRefresh();
}

SyncToServer();

drawtime = GetFastTics() - atime;

// Don't allow player to quit if entering message
canquit = !MSG.messageon;

Expand Down
132 changes: 0 additions & 132 deletions rott/sbconfig.h

This file was deleted.

0 comments on commit a65f4dc

Please sign in to comment.