This commit is contained in:
parent
0918692cfe
commit
4ae128e0ed
1 changed files with 46 additions and 0 deletions
46
source/enemy/nghost.cpp
Normal file
46
source/enemy/nghost.cpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*=========================================================================
|
||||
|
||||
nghost.cpp
|
||||
|
||||
Author: CRB
|
||||
Created:
|
||||
Project: Spongebob
|
||||
Purpose:
|
||||
|
||||
Copyright (c) 2001 Climax Development Ltd
|
||||
|
||||
===========================================================================*/
|
||||
|
||||
#ifndef __ENEMY_NPC_H__
|
||||
#include "enemy\npc.h"
|
||||
#endif
|
||||
|
||||
#ifndef __ENEMY_NGHOST_H__
|
||||
#include "enemy\nghost.h"
|
||||
#endif
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void CNpcGhostEnemy::render()
|
||||
{
|
||||
SprFrame = NULL;
|
||||
|
||||
if ( m_isActive )
|
||||
{
|
||||
CEnemyThing::render();
|
||||
|
||||
if (canRender())
|
||||
{
|
||||
DVECTOR &renderPos=getRenderPos();
|
||||
|
||||
SprFrame = m_actorGfx->Render(renderPos,m_animNo,( m_frame >> 8 ),m_reversed);
|
||||
setSemiTrans( SprFrame, true );
|
||||
m_actorGfx->RotateScale( SprFrame, renderPos, m_drawRotation, 4096, 4096 );
|
||||
|
||||
sBBox boundingBox = m_actorGfx->GetBBox();
|
||||
setCollisionSize( ( boundingBox.XMax - boundingBox.XMin ), ( boundingBox.YMax - boundingBox.YMin ) );
|
||||
setCollisionCentreOffset( ( boundingBox.XMax + boundingBox.XMin ) >> 1, ( boundingBox.YMax + boundingBox.YMin ) >> 1 );
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue