mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-05 12:30:42 +00:00
c1c01f0e0b
DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@4541 1a8010ca-5511-0410-912e-c29ae57300e0
76 lines
2.3 KiB
C
76 lines
2.3 KiB
C
//-------------------------------------------------------------------------
|
|
/*
|
|
Copyright (C) 2010 EDuke32 developers and contributors
|
|
|
|
This file is part of EDuke32.
|
|
|
|
EDuke32 is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License version 2
|
|
as published by the Free Software Foundation.
|
|
|
|
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
//-------------------------------------------------------------------------
|
|
|
|
#ifndef __actors_inline_c__
|
|
#define __actors_inline_c__
|
|
|
|
#include "compat.h"
|
|
#include "build.h"
|
|
#include "global.h"
|
|
#include "duke3d.h"
|
|
#include "actors_inline.h"
|
|
|
|
ACTOR_INLINE int32_t A_SetSprite(int32_t i,uint32_t cliptype)
|
|
{
|
|
vec3_t davect = {(sprite[i].xvel*(sintable[(sprite[i].ang+512)&2047]))>>14,
|
|
(sprite[i].xvel*(sintable[sprite[i].ang&2047]))>>14,
|
|
sprite[i].zvel
|
|
};
|
|
return (A_MoveSprite(i,&davect,cliptype)==0);
|
|
}
|
|
|
|
|
|
EXTERN_INLINE void G_UpdateInterpolations(void) //Stick at beginning of G_DoMoveThings
|
|
{
|
|
int32_t i=g_numInterpolations-1;
|
|
for (; i>=0; i--) oldipos[i] = *curipos[i];
|
|
}
|
|
|
|
|
|
EXTERN_INLINE void G_RestoreInterpolations(void) //Stick at end of drawscreen
|
|
{
|
|
int32_t i=g_numInterpolations-1;
|
|
|
|
if (--g_interpolationLock)
|
|
return;
|
|
|
|
for (; i>=0; i--) *curipos[i] = bakipos[i];
|
|
}
|
|
|
|
EXTERN_INLINE int32_t G_CheckForSpaceCeiling(int32_t sectnum)
|
|
{
|
|
return ((sector[sectnum].ceilingstat&1) && sector[sectnum].ceilingpal == 0 &&
|
|
(sector[sectnum].ceilingpicnum==MOONSKY1 || sector[sectnum].ceilingpicnum==BIGORBIT1));
|
|
}
|
|
|
|
EXTERN_INLINE int32_t G_CheckForSpaceFloor(int32_t sectnum)
|
|
{
|
|
return ((sector[sectnum].floorstat&1) && sector[sectnum].ceilingpal == 0 &&
|
|
(sector[sectnum].floorpicnum==MOONSKY1 || sector[sectnum].floorpicnum==BIGORBIT1));
|
|
}
|
|
|
|
EXTERN_INLINE int32_t A_CheckEnemySprite(const spritetype *s)
|
|
{
|
|
return A_CheckEnemyTile(s->picnum);
|
|
}
|
|
|
|
#endif
|