Skip to content

Commit

Permalink
Merge branch 'main' into allsoundsrtp
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed May 2, 2024
2 parents 9ec0d38 + c635579 commit 62a0c47
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions rott/rt_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -12541,7 +12541,7 @@ boolean CheckLine (void *from, void *to, int condition)
int value;
int dx,dy,dz;
int xydist;
int otx,oty,count=0;
int otx,oty;



Expand Down Expand Up @@ -12633,7 +12633,7 @@ boolean CheckLine (void *from, void *to, int condition)


do
{count ++;
{
/*
if (count > 1000)
Error("possible infinite loop in CheckLine");
Expand Down
4 changes: 2 additions & 2 deletions rott/rt_door.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ int GetIndexForAction(void (*action)(intptr_t))


void SaveTouchPlates(byte ** buffer,int *size)
{int i,k;
{int i;
byte * tptr;
touchplatetype *temp;
saved_touch_type dummy;
Expand All @@ -318,7 +318,7 @@ void SaveTouchPlates(byte ** buffer,int *size)

for(i=0;i<lasttouch;i++)
{
for(k=0,temp=touchplate[i];temp;k++,temp = temp->nextaction)
for(temp=touchplate[i];temp;temp = temp->nextaction)
{
dummy.tictime = temp->tictime;
dummy.ticcount = temp->ticcount;
Expand Down
7 changes: 5 additions & 2 deletions rott/rt_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -751,14 +751,17 @@ int CalcRotate (objtype *ob)
#define SGN(x) ((x>0) ? (1) : ((x==0) ? (0) : (-1)))

/*--------------------------------------------------------------------------*/
int CompareHeights(s1p,s2p) visobj_t **s1p,**s2p;
int CompareHeights(void *v1p, void *v2p)
{
visobj_t **s1p = (visobj_t **) v1p, **s2p = (visobj_t **) v2p;

whereami=3;
return SGN((*s1p)->viewheight-(*s2p)->viewheight);
}

void SwitchPointers(s1p,s2p) visobj_t **s1p,**s2p;
void SwitchPointers(void *v1p, void *v2p)
{
visobj_t **s1p = (visobj_t **) v1p, **s2p = (visobj_t **) v2p;
visobj_t * temp;

whereami=4;
Expand Down
11 changes: 4 additions & 7 deletions rott/rt_ted.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,15 @@ int GetLumpForTile(int tile);
#define SGN(x) ((x>0) ? (1) : ((x==0) ? (0) : (-1)))

/*--------------------------------------------------------------------------*/
int CompareTags(s1p,s2p) cachetype *s1p,*s2p;
int CompareTags(void *v1p, void *v2p)
{
cachetype *s1p = (cachetype *) v1p, *s2p = (cachetype *) v2p;
return SGN(s1p->lump-s2p->lump);
}

void SwitchCacheEntries(s1p,s2p) cachetype *s1p,*s2p;
void SwitchCacheEntries(void *v1p, void *v2p)
{
cachetype *s1p = (cachetype *) v1p, *s2p = (cachetype *) v2p;
cachetype temp;

temp=*s1p;
Expand Down Expand Up @@ -3289,20 +3291,15 @@ void SetupDoorLinks (void)
int j,
i,
k;
unsigned short *map;
int clocklinked;
int clockx,clocky;
int doornumber;
unsigned short touchx,
touchy;

map = mapplanes[0];

for (j = 0; j < mapheight; j++)
for (i = 0; i < mapwidth; i++)
{
map++;

if (MAPSPOT (i, j, 2))
{
if (IsDoor(i,j)==1)
Expand Down
8 changes: 4 additions & 4 deletions rott/rt_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,15 +1201,15 @@ int SideOfLine(int x1, int y1, int x2, int y2, int x3, int y3)
//
//******************************************************************************

typedef int (*PFI)(); /* pointer to a function returning int */
typedef void (*PFV)(); /* pointer to a function returning int */
typedef int (*PFI)(void *, void*); /* pointer to a function returning int */
typedef void (*PFV)(void *, void*); /* pointer to a function returning int */
static PFI Comp; /* pointer to comparison routine */
static PFV Switch; /* pointer to comparison routine */
static int Width; /* width of an object in bytes */
static char *Base; /* pointer to element [-1] of array */


static void newsift_down(L,U) int L,U;
static void newsift_down(int L, int U)
{ int c;

while(1)
Expand All @@ -1222,7 +1222,7 @@ static void newsift_down(L,U) int L,U;
}
}

void hsort(char * base, int nel, int width, int (*compare)(), void (*switcher)())
void hsort(char * base, int nel, int width, int (*compare)(void *, void*), void (*switcher)(void *, void*))
{
static int i,n,stop;
/* Perform a heap sort on an array starting at base. The array is
Expand Down
2 changes: 1 addition & 1 deletion rott/rt_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void UL_DisplayMemoryError ( int memneeded );

int SideOfLine(int x1, int y1, int x2, int y2, int x3, int y3);

void hsort(char * base, int nel, int width, int (*compare)(), void (*switcher)());
void hsort(char * base, int nel, int width, int (*compare)(void *, void*), void (*switcher)(void *, void*));

char * UL_GetPath (char * path, char *dir);
boolean UL_ChangeDirectory (char *path);
Expand Down

0 comments on commit 62a0c47

Please sign in to comment.