/******************************************************************************** ------------------------- Ultra 64 MARIO Brothers ------------------------- File : pathdosun.s Description : Date : 1995.10.23 Author : H.yajima ********************************************************************************/ #define DOSUN_SCALE 1.4 /*################*/ #ifdef ASSEMBLER /*################*/ /******************************************************************************** sabaku dosun ********************************************************************************/ e_sabaku_dosun: p_initialize(moveBG) p_setbit(flag,stf_moveON | stf_YangleSAME | stf_playerdistON ) p_setshapeinfo(py_obj01_check_info) p_BGcheckYset p_addf(worldY,1) p_save_nowpos p_while p_program(s_dosun) p_program(stMainMoveBG); p_loop /******************************************************************************** toride dosun (1) ********************************************************************************/ e_dosun: p_initialize(moveBG) p_setshapeinfo(dosun_info) p_setbit(flag,stf_moveON | stf_YangleSAME | stf_playerdistON ) p_BGcheckYset p_addf(worldY,1) p_save_nowpos p_set_scale(140) p_setf(shapeLOD,4000) p_while p_program(s_dosun) p_program(stMainMoveBG); p_loop /******************************************************************************** toride dosun (2) ********************************************************************************/ e_dosun_power: p_initialize(moveBG) p_setshapeinfo(dosun_info2) p_setbit(flag,stf_moveON | stf_YangleSAME | stf_playerdistON ) p_BGcheckYset p_addf(worldY,1) p_set_scale(140) p_save_nowpos p_setf(shapeLOD,4000) p_while p_program(s_dosun) p_program(stMainMoveBG); p_loop /*-----------------------------------------------------------------------------*/ /*################*/ #else /*################*/ /******************************************************************************** C Program ********************************************************************************/ #define dosun_timework (execstp->s[stw_work0].d) /********************************************************************************/ /* dosun wait */ /********************************************************************************/ static void dosun_wait(void) { if ( obj_timer == 0 ) dosun_timework = Randomf()*10+20; if ( obj_timer > dosun_timework ) obj_mode = mode_dosun_up; } /********************************************************************************/ /* dosun down */ /********************************************************************************/ static void dosun_down(void) { obj_speedY += -4; obj_worldY += obj_speedY; if ( obj_worldY < obj_attY ){ obj_worldY = obj_attY; obj_speedY = 0; obj_mode = mode_dosun_downend; } } /********************************************************************************/ /* dosun down end */ /********************************************************************************/ static void dosun_downend(void) { if ( obj_timer == 0 ){ if ( obj_playerdist < 1500 ){ s_call_Viewshake(VS_SMALL); objsound(NA_SE3_STONE); } } if ( obj_timer >= 10 ) obj_mode = mode_dosun_wait; } /********************************************************************************/ /* dosun stop */ /* up ---- stop */ /********************************************************************************/ static void dosun_stop(void) { if ( obj_timer == 0 ) dosun_timework = Randomf()*30+10; if ( obj_timer > dosun_timework ) obj_mode = mode_dosun_down; } /********************************************************************************/ /* dosun up */ /********************************************************************************/ static void dosun_up(void) { if ( obj_timer > 40 + (execstp->s[stw_programselect].d) ){ obj_mode = mode_dosun_stop; obj_worldY += 5; } else { obj_worldY += 10; } } /********************************************************************************/ /* dosun */ /********************************************************************************/ static void *dosun_modejmp[] = { dosun_up, dosun_stop, dosun_down, dosun_downend, dosun_wait }; extern void s_dosun(void) { s_modejmp(dosun_modejmp); } /*################*/ #endif /*################*/ /*=============================================================================== end end end end end end end end ===============================================================================*/