mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Make dist() and ldist() take void pointers so we can compare spritetype with tspritetype without inserting casts everywhere.
git-svn-id: https://svn.eduke32.com/eduke32@4910 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
19729fc766
commit
d70ac064b7
3 changed files with 10 additions and 8 deletions
|
@ -125,8 +125,8 @@ static inline int32_t sepdist(const int32_t dx, const int32_t dy, const int32_t
|
||||||
return d.x - (d.x>>4) + (d.y>>2) + (d.y>>3);
|
return d.x - (d.x>>4) + (d.y>>2) + (d.y>>3);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t ldist(const spritetype *s1, const spritetype *s2);
|
int32_t ldist(const void *s1, const void *s2);
|
||||||
int32_t dist(const spritetype *s1, const spritetype *s2);
|
int32_t dist(const void *s1, const void *s2);
|
||||||
|
|
||||||
void COMMON_clearbackground(int32_t numcols, int32_t numrows);
|
void COMMON_clearbackground(int32_t numcols, int32_t numrows);
|
||||||
|
|
||||||
|
|
|
@ -188,14 +188,18 @@ int32_t maybe_append_ext(char *wbuf, int32_t wbufsiz, const char *fn, const char
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t ldist(const spritetype *s1, const spritetype *s2)
|
int32_t ldist(const void *s1, const void *s2)
|
||||||
{
|
{
|
||||||
return sepldist(s1->x-s2->x, s1->y-s2->y);
|
tspritetype const *const sp1 = (tspritetype *)s1;
|
||||||
|
tspritetype const *const sp2 = (tspritetype *)s2;
|
||||||
|
return sepldist(sp1->x - sp2->x, sp1->y - sp2->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t dist(const spritetype *s1, const spritetype *s2)
|
int32_t dist(const void *s1, const void *s2)
|
||||||
{
|
{
|
||||||
return sepdist(s1->x-s2->x, s1->y-s2->y, s1->z-s2->z);
|
tspritetype const *const sp1 = (tspritetype *)s1;
|
||||||
|
tspritetype const *const sp2 = (tspritetype *)s2;
|
||||||
|
return sepdist(sp1->x - sp2->x, sp1->y - sp2->y, sp1->z - sp2->z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,6 @@ void P_HandleSharedKeys(int32_t snum);
|
||||||
int32_t GetAnimationGoal(const int32_t *animptr);
|
int32_t GetAnimationGoal(const int32_t *animptr);
|
||||||
int32_t isanearoperator(int32_t lotag);
|
int32_t isanearoperator(int32_t lotag);
|
||||||
int32_t isanunderoperator(int32_t lotag);
|
int32_t isanunderoperator(int32_t lotag);
|
||||||
int32_t ldist(const spritetype *s1, const spritetype *s2);
|
|
||||||
int32_t dist(const spritetype *s1, const spritetype *s2);
|
|
||||||
int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchissprite);
|
int32_t P_ActivateSwitch(int32_t snum,int32_t w,int32_t switchissprite);
|
||||||
void P_CheckSectors(int32_t snum);
|
void P_CheckSectors(int32_t snum);
|
||||||
int32_t Sect_DamageCeilingOrFloor(int32_t floorp, int32_t sn);
|
int32_t Sect_DamageCeilingOrFloor(int32_t floorp, int32_t sn);
|
||||||
|
|
Loading…
Reference in a new issue