This commit is contained in:
parent
33861a342e
commit
13bbe59b16
15 changed files with 74 additions and 21 deletions
|
@ -28,6 +28,8 @@
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
OTPOS__ACTOR_POS=10,
|
OTPOS__ACTOR_POS=10,
|
||||||
|
OTPOS__PICKUP_POS=10,
|
||||||
|
OTPOS__INGAME_UI=3,
|
||||||
OTPOS__DEBUG_INFO=1,
|
OTPOS__DEBUG_INFO=1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -182,14 +186,14 @@ void CBalloonPickup::renderPickup(DVECTOR *_pos)
|
||||||
xo2=((msin(m_sin)*balloon_scale2)>>12);
|
xo2=((msin(m_sin)*balloon_scale2)>>12);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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);
|
setCollisionCentreOffset(xo1,0);
|
||||||
|
|
||||||
x=_pos->vx+balloon_stringx;
|
x=_pos->vx+balloon_stringx;
|
||||||
y=_pos->vy+(fh->H/2);
|
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++;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -98,7 +102,7 @@ void CCoralBlowerPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__BLOWER);
|
fh=sprites->getFrameHeader(FRM__BLOWER);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -138,7 +142,7 @@ void CBubbleMixturePickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__BUBBLEMIXTURE);
|
fh=sprites->getFrameHeader(FRM__BUBBLEMIXTURE);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/2)+((msin(m_sin)*bubmix_bobscale)>>12);
|
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);
|
fh=sprites->getFrameHeader(FRM__BUBBLEWAND);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -133,12 +137,12 @@ void CGlassesPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__GLASSES);
|
fh=sprites->getFrameHeader(FRM__GLASSES);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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)
|
if(m_glint<=glasses_glintframes)
|
||||||
{
|
{
|
||||||
fh=sprites->getFrameHeader(glasses_glintFrames[(m_glint>>glasses_glintspeed)&0x07]);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -126,7 +130,7 @@ void CBaseHealthPickup::renderPickup(DVECTOR *_pos)
|
||||||
sprites=getSpriteBank();
|
sprites=getSpriteBank();
|
||||||
fh=sprites->getFrameHeader(getFrameNumber());
|
fh=sprites->getFrameHeader(getFrameNumber());
|
||||||
angle=((msin(m_sin)*health_rotatescale)>>12)&4095;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -99,7 +103,7 @@ void CHelmetPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__HELMET);
|
fh=sprites->getFrameHeader(FRM__HELMET);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -71,7 +71,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
PICKUPS_OT_POS=15,
|
|
||||||
DEFAULT_VISIBILITY_RADIUS=32,
|
DEFAULT_VISIBILITY_RADIUS=32,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -136,7 +140,7 @@ void CJellyLauncherAmmoPickup::renderPickup(DVECTOR *_pos)
|
||||||
{
|
{
|
||||||
angle=0;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -129,7 +133,7 @@ void CLifePickup::renderPickup(DVECTOR *_pos)
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/2);
|
y=_pos->vy-(fh->H/2);
|
||||||
size=256+((msin(m_sin)*life_pulsescale)>>12);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -36,6 +36,10 @@
|
||||||
#include <ingamefx.h>
|
#include <ingamefx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Tyepdefs && Defines
|
Tyepdefs && Defines
|
||||||
|
@ -98,7 +102,7 @@ void CNetPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__NET);
|
fh=sprites->getFrameHeader(FRM__NET);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "gfx\prim.h"
|
#include "gfx\prim.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -177,7 +181,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(getFrameNumber());
|
fh=sprites->getFrameHeader(getFrameNumber());
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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)
|
if(m_pingFrame<quest_pingframes)
|
||||||
{
|
{
|
||||||
|
@ -210,7 +214,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
|
||||||
setRGB2(g3,endr,endg,endb);
|
setRGB2(g3,endr,endg,endb);
|
||||||
setShadeTex(g3,0);
|
setShadeTex(g3,0);
|
||||||
setSemiTrans(g3,1);
|
setSemiTrans(g3,1);
|
||||||
AddPrimToList(g3,PICKUPS_OT_POS+1);
|
AddPrimToList(g3,OTPOS__PICKUP_POS+1);
|
||||||
p1=p2;
|
p1=p2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +224,7 @@ void CBaseQuestItemPickup::renderPickup(DVECTOR *_pos)
|
||||||
setSemiTrans(ft3,1);
|
setSemiTrans(ft3,1);
|
||||||
ft3->tpage=(quest_transmode<<5);
|
ft3->tpage=(quest_transmode<<5);
|
||||||
setXY3(ft3,512,512,512,512,512,512);
|
setXY3(ft3,512,512,512,512,512,512);
|
||||||
AddPrimToList(ft3,PICKUPS_OT_POS+1);
|
AddPrimToList(ft3,OTPOS__PICKUP_POS+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "player\player.h"
|
#include "player\player.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -140,8 +144,8 @@ void CShoesPickup::renderPickup(DVECTOR *_pos)
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/2);
|
y=_pos->vy-(fh->H/2);
|
||||||
yoff=((msin(m_sin)*shoes_bobscale)>>12);
|
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,OTPOS__PICKUP_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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================
|
/*===========================================================================
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
#include "pickups\pspatula.h"
|
#include "pickups\pspatula.h"
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
@ -127,14 +131,14 @@ void CSpatulaPickup::renderPickup(DVECTOR *_pos)
|
||||||
fh=sprites->getFrameHeader(FRM__SPATULA);
|
fh=sprites->getFrameHeader(FRM__SPATULA);
|
||||||
x=_pos->vx-(fh->W/2);
|
x=_pos->vx-(fh->W/2);
|
||||||
y=_pos->vy-(fh->H/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)
|
if(m_glint<=255)
|
||||||
{
|
{
|
||||||
fh=sprites->getFrameHeader(spat_glintFrames[(m_glint>>spat_glintgrowspeed)&0x07]);
|
fh=sprites->getFrameHeader(spat_glintFrames[(m_glint>>spat_glintgrowspeed)&0x07]);
|
||||||
x=x+(((spat_gxy2.vx-spat_gxy1.vx)*m_glint)>>8)+spat_gxy1.vx;
|
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;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
#include "pickups/pickup.h"
|
#include "pickups/pickup.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __GFX_OTPOS_H__
|
||||||
|
#include "gfx\otpos.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Std Lib
|
/* Std Lib
|
||||||
------- */
|
------- */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue