mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-03-31 07:21:50 +00:00
Move entitycmpfnc() to cl_view.c an reimplement it
This function is only used in cl_view.c, so no need for external declaration. Reimplement it in a sane and on all platform 64 bit clean way. This allows us to finally remove the horible INT macro.
This commit is contained in:
parent
78b974d3ca
commit
8102e1a021
3 changed files with 16 additions and 27 deletions
|
@ -612,20 +612,6 @@ SCR_Loading_f(void)
|
|||
SCR_BeginLoadingPlaque();
|
||||
}
|
||||
|
||||
int
|
||||
entitycmpfnc(const entity_t *a, const entity_t *b)
|
||||
{
|
||||
/* all other models are sorted by model then skin */
|
||||
if (a->model == b->model)
|
||||
{
|
||||
return (INT)a->skin - (INT)b->skin;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (INT)a->model - (INT)b->model;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SCR_TimeRefresh_f(void)
|
||||
{
|
||||
|
|
|
@ -444,11 +444,25 @@ V_Gun_Model_f(void)
|
|||
gun_model = R_RegisterModel(name);
|
||||
}
|
||||
|
||||
int
|
||||
entitycmpfnc(const entity_t *a, const entity_t *b)
|
||||
{
|
||||
/* all other models are sorted by model then skin */
|
||||
if (a->model == b->model)
|
||||
{
|
||||
return (a->skin == b->skin) ? 0 :
|
||||
(a->skin > b->skin) ? 1 : -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return (a->model == b->model) ? 0 :
|
||||
(a->model > b->model) ? 1 : -1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
V_RenderView(float stereo_separation)
|
||||
{
|
||||
extern int entitycmpfnc(const entity_t *, const entity_t *);
|
||||
|
||||
if (cls.state != ca_active)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -27,17 +27,6 @@
|
|||
#ifndef CL_CLIENT_H
|
||||
#define CL_CLIENT_H
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define INT long int
|
||||
#elif defined __ia64__
|
||||
/* I will have to double check this but if my experience in adding CLIPS to
|
||||
* LLVM is any sign then long int will fail horribly but long long will work on
|
||||
* ia64. I'll double check this on my zx6000. */
|
||||
#define INT long long
|
||||
#else
|
||||
#define INT int
|
||||
#endif
|
||||
|
||||
#define MAX_CLIENTWEAPONMODELS 20
|
||||
#define CMD_BACKUP 256 /* allow a lot of command backups for very fast systems */
|
||||
|
||||
|
|
Loading…
Reference in a new issue