sm64/data/p/pathbox.p
2022-12-04 22:27:02 -05:00

104 lines
2.7 KiB
OpenEdge ABL

/********************************************************************************
-------------------------
Ultra 64 MARIO Brothers
-------------------------
File : pathbox.s
Description :
Date : 1995.8.1
Author : H.yajima
********************************************************************************/
/*################*/
#ifdef ASSEMBLER
/*################*/
/********************************************************************************/
/* */
/* << OPTION >> TAKARABAKO PROGRAM */
/* */
/********************************************************************************/
/********************************************************************************/
/* wakame animation */
/********************************************************************************/
e_tbox:
p_initialize(option)
p_setbit( flag,stf_moveON | stf_YangleSAME )
p_BGcheckYset
p_program(s_box1_init)
p_while
p_program(s_takarabox)
p_loop
e_box2:
p_initialize(option)
p_setbit( flag,stf_moveON | stf_YangleSAME )
p_save_nowpos
p_while
p_program(s_box)
p_loop
/*-----------------------------------------------------------------------------*/
/*################*/
#else
/*################*/
/********************************************************************************
takarabako
*********************************************************************************/
/*------------------------------------------------------------------------------*/
extern void s_box1_init(void)
{
s_change_shape(S_t_box1);
obj_angleY = Randomd();
obj_angleY = 0;
s_makeobj_chain(0,0,424/8+44,(-328/8)-36,execstp,S_t_box2,e_box2);
}
/*------------------------------------------------------------------------------*/
extern void s_takarabox(void)
{
s_player_slideout_RH(200,200);
}
/*------------------------------------------------------------------------------*/
/* box main program */
/*------------------------------------------------------------------------------*/
extern void s_box(void)
{
switch (obj_mode){
case 0:
if ( s_distance_obj2obj(execstp->motherobj,player1stp) < 300 ) obj_mode++;
break;
case 1:
if ( obj_timer == 0 ){
s_makeobj_chain(0,0,-80,120,execstp,S_bubble,e_random_bubble);
AudStartSound(execstp,NA_SE2_BOXOPEN+NA_IN_WATER);
}
obj_animeangleX -= 0x400;
if ( obj_animeangleX < -0x4000) obj_mode++;
case 2:
break;
}
}
/*################*/
#endif
/*################*/
/*===============================================================================
end end end end end end end end
===============================================================================*/