From 13bbe59b16d83cb3f897f898bd51587e9b2e54e1 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 19 Apr 2001 20:46:43 +0000 Subject: [PATCH] --- source/gfx/otpos.h | 2 ++ source/pickups/pballoon.cpp | 10 +++++++--- source/pickups/pblower.cpp | 6 +++++- source/pickups/pbubmix.cpp | 8 ++++++-- source/pickups/pglasses.cpp | 8 ++++++-- source/pickups/phealth.cpp | 6 +++++- source/pickups/phelmet.cpp | 6 +++++- source/pickups/pickup.h | 1 - source/pickups/pjlammo.cpp | 6 +++++- source/pickups/plife.cpp | 6 +++++- source/pickups/pnet.cpp | 6 +++++- source/pickups/pquest.cpp | 10 +++++++--- source/pickups/pshoes.cpp | 8 ++++++-- source/pickups/pspatula.cpp | 8 ++++++-- source/pickups/pspatula.h | 4 ++++ 15 files changed, 74 insertions(+), 21 deletions(-) diff --git a/source/gfx/otpos.h b/source/gfx/otpos.h index be7c241be..e7b6818b6 100644 --- a/source/gfx/otpos.h +++ b/source/gfx/otpos.h @@ -28,6 +28,8 @@ enum { OTPOS__ACTOR_POS=10, + OTPOS__PICKUP_POS=10, + OTPOS__INGAME_UI=3, OTPOS__DEBUG_INFO=1, }; diff --git a/source/pickups/pballoon.cpp b/source/pickups/pballoon.cpp index 9d583b0c6..56a59fd27 100644 --- a/source/pickups/pballoon.cpp +++ b/source/pickups/pballoon.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pblower.cpp b/source/pickups/pblower.cpp index a6e5bcb97..e17a6b501 100644 --- a/source/pickups/pblower.cpp +++ b/source/pickups/pblower.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pbubmix.cpp b/source/pickups/pbubmix.cpp index 5613e36c0..131702042 100644 --- a/source/pickups/pbubmix.cpp +++ b/source/pickups/pbubmix.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pglasses.cpp b/source/pickups/pglasses.cpp index 3da66d1fb..c0288f12c 100644 --- a/source/pickups/pglasses.cpp +++ b/source/pickups/pglasses.cpp @@ -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); } } diff --git a/source/pickups/phealth.cpp b/source/pickups/phealth.cpp index 8b0fcdf75..15d89f443 100644 --- a/source/pickups/phealth.cpp +++ b/source/pickups/phealth.cpp @@ -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); } diff --git a/source/pickups/phelmet.cpp b/source/pickups/phelmet.cpp index c3f882215..3eb11f345 100644 --- a/source/pickups/phelmet.cpp +++ b/source/pickups/phelmet.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pickup.h b/source/pickups/pickup.h index 00ca7b036..37cb75fe4 100644 --- a/source/pickups/pickup.h +++ b/source/pickups/pickup.h @@ -71,7 +71,6 @@ public: protected: enum { - PICKUPS_OT_POS=15, DEFAULT_VISIBILITY_RADIUS=32, }; diff --git a/source/pickups/pjlammo.cpp b/source/pickups/pjlammo.cpp index 7bf6dab72..baa3b38bd 100644 --- a/source/pickups/pjlammo.cpp +++ b/source/pickups/pjlammo.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/plife.cpp b/source/pickups/plife.cpp index 08b5d1707..bed94877b 100644 --- a/source/pickups/plife.cpp +++ b/source/pickups/plife.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pnet.cpp b/source/pickups/pnet.cpp index ac3e5505c..5e1746e34 100644 --- a/source/pickups/pnet.cpp +++ b/source/pickups/pnet.cpp @@ -36,6 +36,10 @@ #include #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); } /*=========================================================================== diff --git a/source/pickups/pquest.cpp b/source/pickups/pquest.cpp index eddb984c6..6ddbd94a0 100644 --- a/source/pickups/pquest.cpp +++ b/source/pickups/pquest.cpp @@ -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_pingFrametpage=(quest_transmode<<5); setXY3(ft3,512,512,512,512,512,512); - AddPrimToList(ft3,PICKUPS_OT_POS+1); + AddPrimToList(ft3,OTPOS__PICKUP_POS+1); } } diff --git a/source/pickups/pshoes.cpp b/source/pickups/pshoes.cpp index 54cb8ff36..1b50b3147 100644 --- a/source/pickups/pshoes.cpp +++ b/source/pickups/pshoes.cpp @@ -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); } /*=========================================================================== diff --git a/source/pickups/pspatula.cpp b/source/pickups/pspatula.cpp index c9f17334e..dd2d59e8a 100644 --- a/source/pickups/pspatula.cpp +++ b/source/pickups/pspatula.cpp @@ -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); } } diff --git a/source/pickups/pspatula.h b/source/pickups/pspatula.h index 2a73ebbcb..3ea016a5b 100644 --- a/source/pickups/pspatula.h +++ b/source/pickups/pspatula.h @@ -22,6 +22,10 @@ #include "pickups/pickup.h" #endif +#ifndef __GFX_OTPOS_H__ +#include "gfx\otpos.h" +#endif + /* Std Lib ------- */