/******************************************************************************** ------------------------- Ultra 64 MARIO Brothers ------------------------- File : pathkamenori.s Description : Date : 1995. Author : H.yajima ********************************************************************************/ /*################*/ #ifdef ASSEMBLER /*################*/ /*============ nononoko ======================*/ e_nokoboard: p_initialize(item) p_setbit(flag,stf_moveON ) p_setmovedata(30,-400,-50,1000,1000,200,0,0) p_while p_program(s_nokoboard) p_loop /*============ effect fire ======================*/ e_effect_fire: p_initialize(effect) p_setbit(flag,stf_moveON ) p_setobjname(FIRE) p_softspritemodeON p_while p_program(s_effect_fire) p_inc_frame(animecounter,2) p_loop /*################*/ #else /*################*/ /******************************************************************************** C Program (kamenori) ********************************************************************************/ static HitCheckRecord nokoboard_hit = { OBJNAME_NOKOBOARD, 0,4,1,1, /* flag,ap,hp,coin */ 50,50, /* player attack hitarea */ 50,50, /* player damage hitarea */ }; /******************************************************************************** -------------- water effect -------------- ********************************************************************************/ extern void s_makeeffect_water(void) { int i; StrategyRecord *stp; s_makeobj_nowpos(execstp,S_wave,e_enemywave); if ( playerWorks[0].velocity > 10 ){ stp = s_makeobj_nowpos_scale(execstp,S_waterdrop,e_smallwaterdrop,1.5); stp->s[stw_speedY].f = Randomf()*30; s_random_XZ_offset(stp,110); } } /******************************************************************************** -------------- fire effect -------------- ********************************************************************************/ #define effectfire_scale (execstp->s[stw_work1].f) extern void s_effect_fire(void) { if ( obj_timer == 0 ){ obj_angleY = Randomd(); obj_speedY = Randomf()*30; obj_gravity = -4; obj_hmsselectNo = (long)(Randomf()*10); s_random_XZ_offset(execstp,110); effectfire_scale = 4; } s_groundcheck(); s_optionmove_F(); if ( obj_groundY > obj_worldY || obj_timer > 10 ) s_remove_obj(execstp); effectfire_scale += -0.3; s_set_scale(effectfire_scale); } extern void s_makeeffect_fire(void) { int i; for(i=0;i<2;i++){ s_makeobj_nowpos(execstp,S_fireball_yellow,e_effect_fire); } } /******************************************************************************** -------------- make twinkle -------------- ********************************************************************************/ static void s_makeeffect_twinkle(float yoffset) { StrategyRecord *stp; stp = s_makeobj_nowpos(execstp,S_NULL,e_twinkle_special); stp->s[stw_worldY].f += yoffset; } /******************************************************************************** ----------------- nokonoko board ----------------- ********************************************************************************/ extern void s_nokoboard(void) { BGCheckData *bgdata; s_set_hitparam( execstp,&nokoboard_hit ); /* Set HitCheck Param */ s_set_scale(1.0); switch(obj_mode){ case 0: s_enemybgcheck(); s_wallreverse(); if ( obj_mail & EMAIL_PLAYERHIT ) obj_mode++; obj_animeangleY+= 0x1000; s_enemymove(-20); s_makeeffect_twinkle(10); break; case 1: s_copy_worldXYZ (execstp,player1stp); bgdata = s_groundcheck_ptr(); if ( s_abs_f( mcWaterCheck(obj_worldX,obj_worldZ) - obj_worldY ) < 10 ) s_makeeffect_water(); else if ( s_abs_f( obj_worldY-obj_groundY ) < 5 ){ if ( bgdata != NULL && bgdata->BGattr == BGCHECKCODE_DAMEDE_1 ) s_makeeffect_fire(); else s_makeeffect_twinkle(10); } else s_makeeffect_twinkle(10); obj_animeangleY = player1stp->s[stw_angleY].d; if ( obj_mail & EMAIL_NOKOBOARD_OFF ){ s_remove_obj(execstp); s_kemuri(); obj_mode = 0; } break; } obj_mail = 0; } /*################*/ #endif /*################*/ /*=============================================================================== end end end end end end end end ===============================================================================*/