This commit is contained in:
parent
30f38c3c45
commit
09bf0f7421
7 changed files with 141 additions and 39 deletions
|
@ -83,7 +83,8 @@ enemy_src := npc \
|
||||||
nprojjf \
|
nprojjf \
|
||||||
nmjback \
|
nmjback \
|
||||||
nsjback \
|
nsjback \
|
||||||
nsj2back
|
nsj2back \
|
||||||
|
nbuttfly
|
||||||
|
|
||||||
friend_src := friend \
|
friend_src := friend \
|
||||||
fdata \
|
fdata \
|
||||||
|
|
|
@ -117,7 +117,7 @@ ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball
|
||||||
|
|
||||||
# Boogermonster GiantWorm Jellyfish2 Motherjellyfish Nautilus Neptune SeaSnake SharkSub
|
# Boogermonster GiantWorm Jellyfish2 Motherjellyfish Nautilus Neptune SeaSnake SharkSub
|
||||||
|
|
||||||
ACTOR_SPRITES := Jellyfish1 Squiddart Plankton
|
ACTOR_SPRITES := Jellyfish1 Squiddart Plankton Butterfly
|
||||||
|
|
||||||
ACTOR_SPR_LIST := $(foreach ACTOR,$(ACTOR_SPRITES), $(ACTOR_IN_DIR)/$(ACTOR)/$(ACTOR_SPRITE_DIR)/$(ACTOR)_*.bmp)
|
ACTOR_SPR_LIST := $(foreach ACTOR,$(ACTOR_SPRITES), $(ACTOR_IN_DIR)/$(ACTOR)/$(ACTOR_SPRITE_DIR)/$(ACTOR)_*.bmp)
|
||||||
ACTOR_SPR_DEP := $(foreach ACTOR,$(ACTOR_SPRITES), $(ACTOR_IN_DIR)/$(ACTOR)/$(ACTOR_SPRITE_DIR)/*)
|
ACTOR_SPR_DEP := $(foreach ACTOR,$(ACTOR_SPRITES), $(ACTOR_IN_DIR)/$(ACTOR)/$(ACTOR_SPRITE_DIR)/*)
|
||||||
|
|
|
@ -638,6 +638,10 @@ void CNpcEnemy::init()
|
||||||
m_isCaught = false;
|
m_isCaught = false;
|
||||||
m_isBlowerOn = false;
|
m_isBlowerOn = false;
|
||||||
m_speed = m_data[m_type].speed;
|
m_speed = m_data[m_type].speed;
|
||||||
|
|
||||||
|
setCollisionSize( 100, 100 );
|
||||||
|
|
||||||
|
updateCollisionArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -84,6 +84,7 @@ public:
|
||||||
NPC_MOTHER_JELLYFISH_BACKGROUND,
|
NPC_MOTHER_JELLYFISH_BACKGROUND,
|
||||||
NPC_SMALL_JELLYFISH_BACKGROUND,
|
NPC_SMALL_JELLYFISH_BACKGROUND,
|
||||||
NPC_SMALL_JELLYFISH_2_BACKGROUND,
|
NPC_SMALL_JELLYFISH_2_BACKGROUND,
|
||||||
|
NPC_BUTTERFLY_BACKGROUND,
|
||||||
NPC_UNIT_TYPE_MAX,
|
NPC_UNIT_TYPE_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,10 @@
|
||||||
#include <ACTOR_SEASNAKE_ANIM.h>
|
#include <ACTOR_SEASNAKE_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ANIM_BUTTERFLY_HEADER__
|
||||||
|
#include <ACTOR_BUTTERFLY_ANIM.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
{
|
{
|
||||||
|
@ -1079,6 +1083,29 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{ // NPC_BUTTERFLY_BACKGROUND
|
||||||
|
0,//ACTORS_BUTTERFLY_SBK,
|
||||||
|
FRM_JELLYFISH1_SWIM1,
|
||||||
|
NPC_SENSOR_USER_CLOSE,
|
||||||
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
NPC_CLOSE_NONE,
|
||||||
|
NPC_TIMER_NONE,
|
||||||
|
false,
|
||||||
|
2,
|
||||||
|
128,
|
||||||
|
DETECT_ALL_COLLISION,
|
||||||
|
DAMAGE__NONE,
|
||||||
|
16,
|
||||||
|
FRM_JELLYFISH1_SWIM1,
|
||||||
|
NPC_SHOT_GENERIC,
|
||||||
|
0,
|
||||||
|
FRM_JELLYFISH1_SWIM1,
|
||||||
|
true,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
CNpcEnemy::NPC_UNIT_TYPE CNpcEnemy::mapEditConvertTable[NPC_UNIT_TYPE_MAX] =
|
CNpcEnemy::NPC_UNIT_TYPE CNpcEnemy::mapEditConvertTable[NPC_UNIT_TYPE_MAX] =
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
#include "enemy\nsj2back.h"
|
#include "enemy\nsj2back.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __ENEMY_NBUTTFLY_H__
|
||||||
|
#include "enemy\nbuttfly.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __ENEMY_NPC_H__
|
#ifndef __ENEMY_NPC_H__
|
||||||
#include "enemy\npc.h"
|
#include "enemy\npc.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -65,7 +69,7 @@ void CJellyfishGenerator::init()
|
||||||
{
|
{
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
m_on = false;
|
m_level = 3;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -99,26 +103,56 @@ void CJellyfishGenerator::think( int _frames, CLevel *level )
|
||||||
|
|
||||||
m_jellyfishCount++;
|
m_jellyfishCount++;
|
||||||
|
|
||||||
CNpcEnemy *enemy;
|
CNpcEnemy *enemy = NULL;
|
||||||
|
|
||||||
if ( m_level == 1 )
|
switch( m_level )
|
||||||
{
|
{
|
||||||
enemy = new( "jellyfish" ) CNpcSmallJellyfishBackgroundEnemy;
|
case 1:
|
||||||
}
|
{
|
||||||
else
|
enemy = new( "jellyfish" ) CNpcSmallJellyfishBackgroundEnemy;
|
||||||
{
|
|
||||||
enemy = new( "jellyfish" ) CNpcSmallJellyfish2BackgroundEnemy;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
enemy = new( "jellyfish" ) CNpcSmallJellyfish2BackgroundEnemy;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
enemy = new( "butterfly" ) CNpcButterflyBackgroundEnemy;
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(enemy);
|
ASSERT(enemy);
|
||||||
|
|
||||||
if ( m_level == 1 )
|
switch( m_level )
|
||||||
{
|
{
|
||||||
enemy->setType( CNpcEnemy::NPC_SMALL_JELLYFISH_BACKGROUND );
|
case 1:
|
||||||
}
|
{
|
||||||
else
|
enemy->setType( CNpcEnemy::NPC_SMALL_JELLYFISH_BACKGROUND );
|
||||||
{
|
|
||||||
enemy->setType( CNpcEnemy::NPC_SMALL_JELLYFISH_2_BACKGROUND );
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
enemy->setType( CNpcEnemy::NPC_SMALL_JELLYFISH_2_BACKGROUND );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
enemy->setType( CNpcEnemy::NPC_BUTTERFLY_BACKGROUND );
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enemy->init();
|
enemy->init();
|
||||||
|
@ -127,34 +161,61 @@ void CJellyfishGenerator::think( int _frames, CLevel *level )
|
||||||
DVECTOR offset = CLevel::getCameraPos();
|
DVECTOR offset = CLevel::getCameraPos();
|
||||||
|
|
||||||
DVECTOR startPos;
|
DVECTOR startPos;
|
||||||
if ( m_level == 1 )
|
|
||||||
{
|
|
||||||
CNpcSmallJellyfishBackgroundEnemy *jfish = ( CNpcSmallJellyfishBackgroundEnemy * ) enemy;
|
|
||||||
|
|
||||||
if ( ( getRnd() % 10 ) > 4 )
|
switch( m_level )
|
||||||
{
|
|
||||||
jfish->setTargetHeading( 0 );
|
|
||||||
startPos.vx = offset.vx - 20;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
jfish->setTargetHeading( 2048 );
|
|
||||||
startPos.vx = offset.vx + VidGetScrW() + 20;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
CNpcSmallJellyfish2BackgroundEnemy *jfish = ( CNpcSmallJellyfish2BackgroundEnemy * ) enemy;
|
case 1:
|
||||||
|
{
|
||||||
|
CNpcSmallJellyfishBackgroundEnemy *jfish = ( CNpcSmallJellyfishBackgroundEnemy * ) enemy;
|
||||||
|
|
||||||
if ( ( getRnd() % 10 ) > 4 )
|
if ( ( getRnd() % 10 ) > 4 )
|
||||||
{
|
{
|
||||||
jfish->setTargetHeading( 0 );
|
jfish->setTargetHeading( 0 );
|
||||||
startPos.vx = offset.vx - 20;
|
startPos.vx = offset.vx - 20;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jfish->setTargetHeading( 2048 );
|
||||||
|
startPos.vx = offset.vx + VidGetScrW() + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
case 2:
|
||||||
{
|
{
|
||||||
jfish->setTargetHeading( 2048 );
|
CNpcSmallJellyfish2BackgroundEnemy *jfish = ( CNpcSmallJellyfish2BackgroundEnemy * ) enemy;
|
||||||
startPos.vx = offset.vx + VidGetScrW() + 20;
|
|
||||||
|
if ( ( getRnd() % 10 ) > 4 )
|
||||||
|
{
|
||||||
|
jfish->setTargetHeading( 0 );
|
||||||
|
startPos.vx = offset.vx - 20;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jfish->setTargetHeading( 2048 );
|
||||||
|
startPos.vx = offset.vx + VidGetScrW() + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
CNpcButterflyBackgroundEnemy *jfish = ( CNpcButterflyBackgroundEnemy * ) enemy;
|
||||||
|
|
||||||
|
if ( ( getRnd() % 10 ) > 4 )
|
||||||
|
{
|
||||||
|
jfish->setTargetHeading( 0 );
|
||||||
|
startPos.vx = offset.vx - 20;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jfish->setTargetHeading( 2048 );
|
||||||
|
startPos.vx = offset.vx + VidGetScrW() + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -137,6 +137,14 @@ SOURCE=..\..\..\source\enemy\nbooger.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\enemy\nbuttfly.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\..\..\source\enemy\nbuttfly.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\..\..\source\enemy\nclam.cpp
|
SOURCE=..\..\..\source\enemy\nclam.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue