123 lines
3.0 KiB
OpenEdge ABL
123 lines
3.0 KiB
OpenEdge ABL
/********************************************************************************
|
|
-------------------------
|
|
Ultra 64 MARIO Brothers
|
|
-------------------------
|
|
|
|
File :
|
|
Description :
|
|
Date : 1995.10.26
|
|
Author : H.yajima
|
|
|
|
********************************************************************************/
|
|
|
|
|
|
/*################*/
|
|
#ifdef ASSEMBLER
|
|
/*################*/
|
|
|
|
e_obake_coin:
|
|
p_initialize(item)
|
|
p_sethitbox(32,64)
|
|
p_setname(COIN) /* player coincount ++ */
|
|
p_setbit( flag,stf_moveON | stf_alldispON )
|
|
p_setmovedata(30,-400,-70,1000,1000,200,0,0)
|
|
p_softspritemodeON
|
|
p_while
|
|
p_program(s_obake_coin)
|
|
p_animeinc
|
|
p_loop
|
|
|
|
|
|
/*################*/
|
|
#else
|
|
/*################*/
|
|
|
|
/********************************************************************************
|
|
---------------------
|
|
obake coin program
|
|
---------------------
|
|
********************************************************************************/
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
/* obake bound coin */
|
|
/*------------------------------------------------------------------------------*/
|
|
static void obakecoin_bound(void)
|
|
{
|
|
|
|
s_enemybgcheck();
|
|
s_wallreverse();
|
|
|
|
if ( obj_movestatus & MOVESTAT_BGBOUND ) objsound(NA_SE2_COINBOUND);
|
|
if ( ( obj_timer > 90 ) || (( obj_movestatus & MOVESTAT_BGBOUND )!= 0) ){
|
|
s_hitON();
|
|
s_change_pathname(e_coin);
|
|
}
|
|
s_enemymove(-78);
|
|
}
|
|
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
/* obake take coin */
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
static void obakecoin_take(void)
|
|
{
|
|
|
|
short playerY;
|
|
float playerspeed;
|
|
StrategyRecord *mother = execstp->motherobj; /* coin */
|
|
s_copy_worldXYZ(execstp,mother);
|
|
if ( mother->obake_flag != 0 ){
|
|
mother->obake_flag = 0;
|
|
obj_mode = mode_obakecoin_bound;
|
|
playerY = (short)(player1stp->s[stw_angleY].d);
|
|
playerspeed = 3;
|
|
obj_speedX = playerspeed * sin(playerY);
|
|
obj_speedZ = playerspeed * cos(playerY);
|
|
obj_speedY = 35;
|
|
|
|
}
|
|
s_hitOFF();
|
|
|
|
}
|
|
|
|
/*------------------------------------------------------------------------------*/
|
|
/* obake coin */
|
|
/*------------------------------------------------------------------------------*/
|
|
|
|
static HitCheckRecord obakecoin_hit = {
|
|
OBJNAME_COIN,
|
|
0,0,0,0, /* flag,ap,hp,coin */
|
|
32,64, /* player attack hitarea */
|
|
0, 0, /* player damage hitarea */
|
|
};
|
|
|
|
static void *obakecoin_modejmp[] = {
|
|
|
|
obakecoin_take,
|
|
obakecoin_bound
|
|
|
|
};
|
|
|
|
extern void s_obake_coin(void)
|
|
{
|
|
|
|
s_set_hitparam(execstp,&obakecoin_hit);
|
|
if( s_hitcheck(execstp,player1stp) ){
|
|
s_makeobj_nowpos(execstp,S_spark,e_coinspark);
|
|
s_remove_obj(execstp);
|
|
}
|
|
|
|
s_modejmp(obakecoin_modejmp);
|
|
|
|
}
|
|
|
|
|
|
/*################*/
|
|
#endif
|
|
/*################*/
|
|
/*===============================================================================
|
|
end end end end end end end end
|
|
===============================================================================*/
|
|
|