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

101 lines
2.0 KiB
OpenEdge ABL

/********************************************************************************
-------------------------
Ultra 64 MARIO Brothers
-------------------------
File : jumpbg program
Description :
Date : 1995.11,18
Author : H.yajima
********************************************************************************/
/*################*/
#ifdef ASSEMBLER
/*################*/
/*----------------------------------------------*/
e_jumpbg:
p_initialize(moveBG)
p_setbit(flag,stf_moveON )
p_setshapeinfo(bane_ue_info)
p_save_nowpos
p_while
p_program(s_jumpbg)
p_program(stMainMoveBG)
p_loop
/*----------------------------------------------*/
e_bane_naka:
p_initialize(option)
p_setbit(flag,stf_moveON )
p_save_nowpos
p_while
p_program(s_bane_naka)
p_loop
/*################*/
#else
/*################*/
/********************************************************************************
jumping BG Program
********************************************************************************/
extern void s_bane_naka(void)
{
float sc;
float dist;
s_copy_worldXYZ_angleXYZ(execstp,execstp->motherobj);
s_copy_animeposY(execstp,execstp->motherobj);
obj_worldY -= 75;
if ( ( dist = obj_worldY - obj_attY ) >= 0 ){
sc = (dist/ 10.0+1.0 );
} else {
dist = -dist;
sc = 1.0-(dist/ 500.0);
}
stSetScale(execstp,1.0,sc,1.0);
}
extern void s_jumpbg(void)
{
StrategyRecord *stp;
s_change_shape(S_bane_ue);
if ( obj_timer == 0 ){
stp = s_makeobj_nowpos(execstp,S_bane_naka,e_bane_naka);
stp->s[stw_worldY].f -= 75;
stp = s_makeobj_nowpos(execstp,S_bane_sita,e_stop);
stp->s[stw_worldY].f -= 75 + 75 ;
}
if ( player1stp->ride_strat == execstp ) execstp->s[stw_work7].d = 1;
else {
execstp->s[stw_work7].d = 0;
obj_worldY = obj_attY;
}
DoTrampoline();
}
/*################*/
#endif
/*################*/
/*===============================================================================
end end end end end end end end
===============================================================================*/