sm64/data/iwa_path/movebg_31.s
2022-12-04 22:27:02 -05:00

83 lines
2.3 KiB
ArmAsm

/********************************************************************************
-------------------------
Ultra 64 MARIO Brothers
-------------------------
stage31 MoveBg Strategy
Feburary 24 1996 programed by Iwamoto Daiki
********************************************************************************/
/*################*/
#ifdef ASSEMBLER
/*################*/
/********************************************************************************
Path Data
********************************************************************************/
e_shipoar:
p_initialize(option)
p_setbit(flag,stf_moveON)
p_program(s_shipoar_init)
p_while
p_program(s_shipoar_main)
p_loop
/*################*/
#else
/*################*/
/***************************************************************************************************
C Program
****************************************************************************************************/
/*==================================================================================================*/
/*==================================================================================================*/
#define obj_att_angY (execstp->s[stw_work0].d)
#define obj_att_angX (execstp->s[stw_work1].d)
/***************************************************************************************************
Main
***************************************************************************************************/
extern void s_shipoar_init(void)
{
obj_att_angY = obj_animeangleY;
obj_att_angX = obj_animeangleX;
}
/***************************************************************************************************
Main
***************************************************************************************************/
extern void s_shipoar_main(void)
{
if (execstp->s[stw_programselect].d == 0) {
obj_animeangleY = obj_att_angY + 0X2000*sin(obj_timer*0x400);
obj_animeangleX = obj_att_angX + 0X800 *cos(obj_timer*0x400);
}
else {
obj_animeangleY = obj_att_angY - 0X2000*sin(obj_timer*0x400);
obj_animeangleX = obj_att_angX + 0X800 *cos(obj_timer*0x400);
}
if (obj_timer==0x40) {
objsound(NA_SE2_SHIP_ROW);
obj_timer = 0;
}
}
/*################*/
#endif
/*################*/