/******************************************************************************** ------------------------- Ultra 64 MARIO Brothers ------------------------- File : pathbubblejet.s Description : Date : 1995.1 Author : H.yajima ********************************************************************************/ /*################*/ #ifdef ASSEMBLER /*################*/ /********************************************************************************/ /* */ /* PLAYER bubble jet */ /* */ /********************************************************************************/ /*------------------------------------------------------------------------------*/ /* */ /* 1 bubble jet program */ /* */ /*------------------------------------------------------------------------------*/ e_bubblejet_1: p_initialize(effect) p_softspritemodeON p_setbit(flag,stf_moveON) p_program(s_bubblejet_init) p_do(70) p_program(s_bubblejet_main) p_next p_killshape /*------------------------------------------------------------------------------*/ /* player DIVING bubblejet program */ /*------------------------------------------------------------------------------*/ e_bubblejet: p_initialize(option) p_mother_clrbit(effect,stf_bubblejet) p_shapeDISABLE p_program(s_bubblejet_makeinit) p_killshape /*------------------------------------------------------------------------------*/ /* enemy bubblejet program ( timer remove ) */ /*------------------------------------------------------------------------------*/ e_enemy_bubblejet: p_initialize(effect) p_softspritemodeON p_setbit(flag,stf_moveON) p_program(s_bubblejet_init) p_do(30) p_program(s_bubblejet_main) p_next p_killshape /*------------------------------------------------------------------------------*/ /* select room bubblejet */ /*------------------------------------------------------------------------------*/ e_bubblejet_lib: p_initialize(effect) p_softspritemodeON p_setbit(flag,stf_moveON) p_program(s_bubblejet_init) p_do(70) p_program(s_bubblejet_lib) p_next p_killshape e_sel1f_bubblejet: p_initialize(option) p_while p_program(s_sel1f_bubblejet) p_loop /*################*/ #else /*################*/ /********************************************************************************/ /* bublejet program */ /********************************************************************************/ #define bubblejet_scale_X (execstp->s[stw_work0].d) #define bubblejet_scale_Z (execstp->s[stw_work1].d) #define bubblejet_random_X (execstp->s[stw_work2].d) #define bubblejet_random_Z (execstp->s[stw_work3].d) /********************************************************************************/ /* */ /* bubblejet animation lib */ /* */ /********************************************************************************/ static void bubblejet_anime(void) { execstp->map.scale[0] = sin(bubblejet_scale_X)*0.5+2.0; /* X scale animation */ bubblejet_scale_X += bubblejet_random_X; execstp->map.scale[1] = sin(bubblejet_scale_Z)*0.5+2.0; /* Z scale animation */ bubblejet_scale_Z += bubblejet_random_Z; } /********************************************************************************/ /* */ /* bubblejet main program */ /* */ /********************************************************************************/ /*------------------------------------------------------------------------------*/ /* bubble jet initialize */ /*------------------------------------------------------------------------------*/ extern void s_bubblejet_init(void) { stSetScale(execstp,2.0,2.0,1.0); bubblejet_random_X = (int)(Randomf()*0x800)+0x800; bubblejet_random_Z = (int)(Randomf()*0x800)+0x800; s_random_XYZ_offset(execstp,100); } /*------------------------------------------------------------------------------*/ /* bubble jet main */ /*------------------------------------------------------------------------------*/ extern void s_bubblejet_main(void) { float water = mcWaterCheck(obj_worldX,obj_worldZ); obj_worldY += 5; s_random_XZ_offset(execstp,4); bubblejet_anime(); if ( ( obj_worldY > water ) && ( obj_timer != 0 ) ){ s_remove_obj(execstp); s_makeobj_effect(5,0,execstp,S_rippleA,e_rippleA ); } } extern void s_bubblejet_lib(void) { obj_worldY += 5; s_random_XZ_offset(execstp,4); bubblejet_anime(); } extern void s_sel1f_bubblejet(void) { if ( map_areacode == 15 || map_areacode == 7 ){ if ( frameCounter & 1 ) s_makeobj_nowpos(execstp,S_waterdrop,e_bubblejet_lib); } } /********************************************************************************/ /* bubble jet init /********************************************************************************/ extern void s_bubblejet_makeinit(void) { int i; for(i=0;i<3;i++) s_makeobj_nowpos(execstp,S_waterdrop,e_bubblejet_1); } /*################*/ #endif /*################*/ /*=============================================================================== end end end end end end end end ===============================================================================*/