SW: Fix C uspritetype errors.

git-svn-id: https://svn.eduke32.com/eduke32@6042 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2017-01-23 11:21:08 +00:00
parent 0f19c98264
commit 64ba5ed84d
4 changed files with 25 additions and 26 deletions

View file

@ -70,13 +70,13 @@ extern SWBOOL RedrawScreen;
SWBOOL RedrawCompass=FALSE;
extern int Follow_posx,Follow_posy;
int ConnectCopySprite(SPRITEp tsp);
int ConnectCopySprite(uspritetype const * tsp);
void PreDrawStackedWater(void);
void DrawCompass(PLAYERp pp);
#if 1
void
ShadeSprite(SPRITEp tsp)
ShadeSprite(uspritetype * tsp)
{
// set shade of sprite
tsp->shade = sector[tsp->sectnum].floorshade - 25;
@ -99,7 +99,7 @@ GetRotation(short tSpriteNum, int viewx, int viewy)
short rotation;
extern short screenpeek;
SPRITEp tsp = &tsprite[tSpriteNum];
uspritetype * tsp = &tsprite[tSpriteNum];
USERp tu = User[tsp->owner];
PLAYERp pp = Player + screenpeek;
short angle2;
@ -167,7 +167,7 @@ directions was not standardized.
int
SetActorRotation(short tSpriteNum, int viewx, int viewy)
{
SPRITEp tsp = &tsprite[tSpriteNum];
uspritetype * tsp = &tsprite[tSpriteNum];
USERp tu = User[tsp->owner];
short StateOffset, Rotation;
@ -228,7 +228,7 @@ SetActorRotation(short tSpriteNum, int viewx, int viewy)
}
int
DoShadowFindGroundPoint(SPRITEp sp)
DoShadowFindGroundPoint(uspritetype * sp)
{
// USES TSPRITE !!!!!
USERp u = User[sp->owner];
@ -366,9 +366,9 @@ DoVoxelShadow(SPRITEp tspr)
#endif
void
DoShadows(SPRITEp tsp, int viewz)
DoShadows(uspritetype * tsp, int viewz)
{
SPRITEp new = &tsprite[spritesortcnt];
uspritetype * new = &tsprite[spritesortcnt];
USERp tu = User[tsp->owner];
int ground_dist = 0;
int view_dist = 0;
@ -461,9 +461,9 @@ DoShadows(SPRITEp tsp, int viewz)
}
void
DoMotionBlur(SPRITEp tsp)
DoMotionBlur(uspritetype const * tsp)
{
SPRITEp new;
uspritetype * new;
USERp tu = User[tsp->owner];
int nx,ny,nz = 0,dx,dy,dz;
short i, ang;
@ -565,7 +565,8 @@ void SetVoxelSprite(SPRITEp sp, short pic)
void WarpCopySprite(void)
{
SPRITEp new, sp1, sp2, sp;
SPRITEp sp1, sp2, sp;
uspritetype * new;
short sn, nsn;
short sn2, nsn2;
short spnum, next_spnum;
@ -642,7 +643,7 @@ void WarpCopySprite(void)
}
}
void DoStarView(SPRITEp tsp, USERp tu, int viewz)
void DoStarView(uspritetype * tsp, USERp tu, int viewz)
{
extern STATE s_Star[], s_StarDown[];
extern STATE s_StarStuck[], s_StarDownStuck[];
@ -671,7 +672,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
int tSpriteNum, j, k;
short SpriteNum, pnum;
int smr4, smr2;
SPRITEp tsp;
uspritetype * tsp;
USERp tu;
static int ang = 0;
PLAYERp pp = Player + screenpeek;
@ -973,7 +974,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
}
#if 1
SPRITEp
uspritetype *
get_tsprite(short SpriteNum)
{
int tSpriteNum;
@ -992,7 +993,7 @@ post_analyzesprites(void)
{
int tSpriteNum;
short SpriteNum;
SPRITEp tsp;
uspritetype * tsp;
USERp tu;
for (tSpriteNum = spritesortcnt - 1; tSpriteNum >= 0; tSpriteNum--)
@ -1006,10 +1007,8 @@ post_analyzesprites(void)
{
if (tu->ID == FIREBALL_FLAMES && tu->Attach >= 0)
{
//SPRITEp atsp = &sprite[tu->Attach];
SPRITEp atsp;
atsp = get_tsprite(tu->Attach);
//uspritetype * const atsp = &sprite[tu->Attach];
uspritetype * const atsp = get_tsprite(tu->Attach);
if (!atsp)
{
@ -2049,7 +2048,7 @@ PostDraw(void)
}
}
int CopySprite(SPRITEp tsp, short newsector)
int CopySprite(uspritetype const * tsp, short newsector)
{
short new;
SPRITEp sp;
@ -2078,7 +2077,7 @@ int CopySprite(SPRITEp tsp, short newsector)
return new;
}
int ConnectCopySprite(SPRITEp tsp)
int ConnectCopySprite(uspritetype const * tsp)
{
short newsector;
int testz;
@ -2149,7 +2148,7 @@ void PreDrawStackedWater(void)
sp = &sprite[i];
u = User[i];
new = ConnectCopySprite(sp);
new = ConnectCopySprite((uspritetype const *)sp);
if (new >= 0)
{
np = &sprite[new];

View file

@ -305,7 +305,7 @@ ToggleSprites()
void
DoAutoSize(spritetype *tspr)
DoAutoSize(uspritetype *tspr)
{
short i;
@ -460,7 +460,7 @@ void
ExtAnalyzeSprites(int32_t ourx, int32_t oury, int32_t oura, int32_t smoothr)
{
int i, currsprite;
spritetype *tspr;
uspritetype *tspr;
UNREFERENCED_PARAMETER(ourx);
UNREFERENCED_PARAMETER(oury);

View file

@ -917,7 +917,7 @@ JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, short tpang, int tphoriz)
}
void
DoAutoSize(SPRITEp tspr)
DoAutoSize(uspritetype * tspr)
{
short i;
@ -1069,7 +1069,7 @@ DoAutoSize(SPRITEp tspr)
short rotang = 0;
void
JAnalyzeSprites(SPRITEp tspr)
JAnalyzeSprites(uspritetype * tspr)
{
int i, currsprite;

View file

@ -68,7 +68,7 @@ extern short floormirrorsector[MAXMIRRORS];
extern SWBOOL mirrorinview;
extern short NormalVisibility;
void JAnalyzeSprites(SPRITEp tspr);
void JAnalyzeSprites(uspritetype * tspr);
void JS_DrawMirrors(PLAYERp pp,int tx,int ty,int tz,short tpang,int tphoriz);
void JS_InitMirrors(void);
void JS_InitLockouts(void);