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

155 lines
3.3 KiB
OpenEdge ABL

/********************************************************************************
-------------------------
Ultra 64 MARIO Brothers
-------------------------
File : patheventmonky.s
Description :
Date : 1995.
Author : H.yajima
********************************************************************************/
/*################*/
#ifdef ASSEMBLER
/*################*/
/***********************************
event monky ( enemy )
**********************************/
e_event_monky:
p_initialize(enemyA)
p_jmp(e_monky_common) /* goto monky program */
/***********************************
event monky check position
**********************************/
e_monky_check:
p_initialize(enemyA)
p_setbit(flag,stf_moveON )
p_setf(worldX,2560)
p_setf(worldY,1457)
p_setf(worldZ,1898)
p_end
/***********************************
donky star
**********************************/
e_donky_star:
p_initialize(option)
p_setbit(flag,stf_moveON )
p_save_nowpos
p_while
p_program(s_donky_star)
p_loop
/***********************************
donky kago
**********************************/
e_donky_kago:
p_initialize(moveBG)
p_setbit(flag,stf_moveON | stf_YangleSAME )
p_save_nowpos
p_setshapeinfo(dk_kago_check_info)
p_makeshape(S_polystar,e_donky_star)
p_makeshape(S_NULL,e_monky_check)
p_setf(movebg_checkdist,20000)
p_setmovedata(30,-400,-50,1000,1000,200,0,0)
p_while
p_program(s_donky_kago)
p_loop
/*################*/
#else
/*################*/
/********************************************************************************
C Program (eventmonky)
********************************************************************************/
extern void s_donky_star(void)
{
switch(obj_mode){
case 0:
if ( obj_timer == 0 ){
if ( s_index_bit(1) & BuGetStarFlag(activePlayerNo-1,activeCourseNo-1) ){
s_change_shape(S_shadestar);
}
}
s_copy_worldXYZ(execstp,execstp->motherobj);
s_copy_actorcode(execstp,execstp->motherobj);
if (execstp->motherobj->s[stw_mode].d == mode_donky_kago_end ) obj_mode++;
break;
case 1:
s_remove_obj(execstp);
s_kemuri();
s_boxeffect(20,S_sankaku,0.7f,3);
// s_make_enemystar_entry(CLEARSTAR_NOWPOS,0);
s_enemyset_star(2500,-1200,1300);
break;
}
obj_animeangleY += 0x400;
}
/********************************************************************************
C Program (eventmonky)
********************************************************************************/
static void donky_kago_wait(void)
{
if ( obj_imm != 0 ) obj_mode = mode_donky_kago_rot;
stMainMoveBG();
}
static void donky_kago_rot(void)
{
if ( obj_imm != 1 ) obj_mode = mode_donky_kago_move;
obj_angleY+= 0x800;
stMainMoveBG();
}
static void donky_kago_move(void)
{
s_enemybgcheck();
s_enemymove(78);
if ( obj_movestatus & ( MOVESTAT_BGBOUND + MOVESTAT_DIVE ) ) obj_mode = mode_donky_kago_end;
}
static void donky_kago_end(void)
{
s_shape_hide();
}
static void *donky_modejmp[] = {
donky_kago_wait,
donky_kago_rot,
donky_kago_move,
donky_kago_end
};
extern void s_donky_kago(void)
{
// s_debug_position();
s_modejmp(donky_modejmp);
}
/*################*/
#endif
/*################*/
/*===============================================================================
end end end end end end end end
===============================================================================*/