This commit is contained in:
Paul 2001-04-19 20:46:43 +00:00
parent 33861a342e
commit 13bbe59b16
15 changed files with 74 additions and 21 deletions

View file

@ -28,6 +28,8 @@
enum
{
OTPOS__ACTOR_POS=10,
OTPOS__PICKUP_POS=10,
OTPOS__INGAME_UI=3,
OTPOS__DEBUG_INFO=1,
};

View file

@ -41,6 +41,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -182,14 +186,14 @@ void CBalloonPickup::renderPickup(DVECTOR *_pos)
xo2=((msin(m_sin)*balloon_scale2)>>12);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x+xo1,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x+xo1,y,0,0,OTPOS__PICKUP_POS);
setCollisionCentreOffset(xo1,0);
x=_pos->vx+balloon_stringx;
y=_pos->vy+(fh->H/2);
DrawLine(x+xo1,y,x+xo2,y+balloon_height,balloon_r1,balloon_g1,balloon_b1,PICKUPS_OT_POS);
DrawLine(x+xo1,y,x+xo2,y+balloon_height,balloon_r1,balloon_g1,balloon_b1,OTPOS__PICKUP_POS);
x++;
DrawLine(x+xo1,y,x+xo2,y+balloon_height,balloon_r2,balloon_g2,balloon_b2,PICKUPS_OT_POS);
DrawLine(x+xo1,y,x+xo2,y+balloon_height,balloon_r2,balloon_g2,balloon_b2,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -25,6 +25,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -98,7 +102,7 @@ void CCoralBlowerPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__BLOWER);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -29,6 +29,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -138,7 +142,7 @@ void CBubbleMixturePickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__BUBBLEMIXTURE);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2)+((msin(m_sin)*bubmix_bobscale)>>12);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
}
@ -211,7 +215,7 @@ void CBubbleWandPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__BUBBLEWAND);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -25,6 +25,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -133,12 +137,12 @@ void CGlassesPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__GLASSES);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
if(m_glint<=glasses_glintframes)
{
fh=sprites->getFrameHeader(glasses_glintFrames[(m_glint>>glasses_glintspeed)&0x07]);
sprites->printRotatedScaledSprite(fh,x+glasses_gxy.vx,y+glasses_gxy.vy,4095,4095,m_glintRot,PICKUPS_OT_POS-1);
sprites->printRotatedScaledSprite(fh,x+glasses_gxy.vx,y+glasses_gxy.vy,4095,4095,m_glintRot,OTPOS__PICKUP_POS-1);
}
}

View file

@ -29,6 +29,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -126,7 +130,7 @@ void CBaseHealthPickup::renderPickup(DVECTOR *_pos)
sprites=getSpriteBank();
fh=sprites->getFrameHeader(getFrameNumber());
angle=((msin(m_sin)*health_rotatescale)>>12)&4095;
sprites->printRotatedScaledSprite(fh,_pos->vx,_pos->vy,4096,4096,angle,PICKUPS_OT_POS);
sprites->printRotatedScaledSprite(fh,_pos->vx,_pos->vy,4096,4096,angle,OTPOS__PICKUP_POS);
}

View file

@ -25,6 +25,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -99,7 +103,7 @@ void CHelmetPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__HELMET);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -71,7 +71,6 @@ public:
protected:
enum
{
PICKUPS_OT_POS=15,
DEFAULT_VISIBILITY_RADIUS=32,
};

View file

@ -29,6 +29,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -136,7 +140,7 @@ void CJellyLauncherAmmoPickup::renderPickup(DVECTOR *_pos)
{
angle=0;
}
sprites->printRotatedScaledSprite(fh,_pos->vx,_pos->vy,4096,4096,angle,PICKUPS_OT_POS);
sprites->printRotatedScaledSprite(fh,_pos->vx,_pos->vy,4096,4096,angle,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -29,6 +29,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -129,7 +133,7 @@ void CLifePickup::renderPickup(DVECTOR *_pos)
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
size=256+((msin(m_sin)*life_pulsescale)>>12);
sprites->printFT4Scaled(fh,x,y,0,0,PICKUPS_OT_POS,size);
sprites->printFT4Scaled(fh,x,y,0,0,OTPOS__PICKUP_POS,size);
}
/*===========================================================================

View file

@ -36,6 +36,10 @@
#include <ingamefx.h>
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/*----------------------------------------------------------------------
Tyepdefs && Defines
@ -98,7 +102,7 @@ void CNetPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__NET);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -29,6 +29,10 @@
#include "gfx\prim.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -177,7 +181,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(getFrameNumber());
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
if(m_pingFrame<quest_pingframes)
{
@ -210,7 +214,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
setRGB2(g3,endr,endg,endb);
setShadeTex(g3,0);
setSemiTrans(g3,1);
AddPrimToList(g3,PICKUPS_OT_POS+1);
AddPrimToList(g3,OTPOS__PICKUP_POS+1);
p1=p2;
}
@ -220,7 +224,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
setSemiTrans(ft3,1);
ft3->tpage=(quest_transmode<<5);
setXY3(ft3,512,512,512,512,512,512);
AddPrimToList(ft3,PICKUPS_OT_POS+1);
AddPrimToList(ft3,OTPOS__PICKUP_POS+1);
}
}

View file

@ -29,6 +29,10 @@
#include "player\player.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -140,8 +144,8 @@ void CShoesPickup::renderPickup(DVECTOR *_pos)
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
yoff=((msin(m_sin)*shoes_bobscale)>>12);
sprites->printFT4(fh,x+shoes_seperation,y+yoff,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x-shoes_seperation,y-yoff,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x+shoes_seperation,y+yoff,0,0,OTPOS__PICKUP_POS);
sprites->printFT4(fh,x-shoes_seperation,y-yoff,0,0,OTPOS__PICKUP_POS);
}
/*===========================================================================

View file

@ -21,6 +21,10 @@
#include "pickups\pspatula.h"
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */
@ -127,14 +131,14 @@ void CSpatulaPickup::renderPickup(DVECTOR *_pos)
fh=sprites->getFrameHeader(FRM__SPATULA);
x=_pos->vx-(fh->W/2);
y=_pos->vy-(fh->H/2);
sprites->printFT4(fh,x,y,0,0,PICKUPS_OT_POS);
sprites->printFT4(fh,x,y,0,0,OTPOS__PICKUP_POS);
if(m_glint<=255)
{
fh=sprites->getFrameHeader(spat_glintFrames[(m_glint>>spat_glintgrowspeed)&0x07]);
x=x+(((spat_gxy2.vx-spat_gxy1.vx)*m_glint)>>8)+spat_gxy1.vx;
y=y+(((spat_gxy2.vy-spat_gxy1.vy)*m_glint)>>8)+spat_gxy1.vy;
sprites->printRotatedScaledSprite(fh,x,y,4095,4095,m_glintRot,PICKUPS_OT_POS-1);
sprites->printRotatedScaledSprite(fh,x,y,4095,4095,m_glintRot,OTPOS__PICKUP_POS-1);
}
}

View file

@ -22,6 +22,10 @@
#include "pickups/pickup.h"
#endif
#ifndef __GFX_OTPOS_H__
#include "gfx\otpos.h"
#endif
/* Std Lib
------- */