132 lines
2.7 KiB
OpenEdge ABL
132 lines
2.7 KiB
OpenEdge ABL
/********************************************************************************
|
|
-------------------------
|
|
Ultra 64 MARIO Brothers
|
|
-------------------------
|
|
|
|
File : pathswitchcoin.s
|
|
Description :
|
|
Date : 1995.
|
|
Author : H.yajima
|
|
|
|
********************************************************************************/
|
|
|
|
|
|
/*################*/
|
|
#ifdef ASSEMBLER
|
|
/*################*/
|
|
|
|
e_switchcoin:
|
|
p_initialize(moveBG)
|
|
p_setbit(flag,stf_moveON )
|
|
p_setshapeinfo(BCbutton_check_info)
|
|
p_while
|
|
p_program(s_switchcoin)
|
|
p_loop
|
|
|
|
|
|
e_bluecoin:
|
|
p_initialize(item)
|
|
p_setname(COIN)
|
|
p_setbit( flag,stf_moveON | stf_playerdistON | stf_alldispON )
|
|
p_softspritemodeON
|
|
p_sethitbox(100,64)
|
|
p_setd(ap,5)
|
|
p_hitON
|
|
p_animereset
|
|
p_while
|
|
p_program(s_bluecoin)
|
|
p_animeinc
|
|
p_loop
|
|
|
|
|
|
|
|
|
|
/*################*/
|
|
#else
|
|
/*################*/
|
|
/********************************************************************************
|
|
C Program (switchcoin)
|
|
********************************************************************************/
|
|
|
|
#define BLUESWITCH_TIMER 240
|
|
|
|
#define bluecoin_switchptr (execstp->s[stw_work1].pointer)
|
|
|
|
extern void s_bluecoin(void)
|
|
{
|
|
|
|
StrategyRecord *stp;
|
|
|
|
switch(obj_mode){
|
|
case 0:
|
|
s_shapeOFF();
|
|
s_hitOFF();
|
|
bluecoin_switchptr = (void *)s_find_obj(e_switchcoin);
|
|
if ( bluecoin_switchptr != NULL ) obj_mode++;
|
|
break;
|
|
case 1:
|
|
stp = (StrategyRecord *)bluecoin_switchptr;
|
|
if ( stp->s[stw_mode].d == 2 ) obj_mode++;
|
|
break;
|
|
case 2:
|
|
s_shapeON();
|
|
s_hitON();
|
|
if( obj_mail & EMAIL_PLAYERHIT ){
|
|
s_makeobj_nowpos(execstp,S_spark,e_coinspark);
|
|
s_remove_obj(execstp);
|
|
}
|
|
if ( s_flash_shape(BLUESWITCH_TIMER-40,20) ) s_remove_obj(execstp);
|
|
break;
|
|
}
|
|
|
|
obj_mail = 0;
|
|
}
|
|
|
|
|
|
extern void s_switchcoin(void)
|
|
{
|
|
|
|
float offsetY;
|
|
|
|
s_set_scale(3.0);
|
|
|
|
switch(obj_mode){
|
|
case 0:
|
|
if ( ( player1stp->ride_strat == execstp ) && playerWorks[0].status == PS_HIPATKEND ){
|
|
obj_mode++;
|
|
obj_speedY = -20;
|
|
obj_gravity = 0;
|
|
objsound(NA_SE2_STONE_SWITCH);
|
|
}
|
|
stMainMoveBG();
|
|
break;
|
|
case 1:
|
|
if ( obj_timer > 5 ){
|
|
s_shape_hide();
|
|
obj_mode++;
|
|
obj_worldY = player1stp->s[stw_worldY].f - 40;
|
|
s_burneffect(0,0,46);
|
|
} else {
|
|
stMainMoveBG();
|
|
s_optionmove_F();
|
|
}
|
|
break;
|
|
case 2:
|
|
if ( obj_timer < BLUESWITCH_TIMER-40 ) Na_FixSeFlagEntry(NA_ENV_TIME_SLOW);
|
|
else Na_FixSeFlagEntry(NA_ENV_TIME_FAST);
|
|
if ( s_find_obj(e_bluecoin) == NULL || obj_timer > BLUESWITCH_TIMER ) s_remove_obj(execstp);
|
|
break;
|
|
}
|
|
|
|
}
|
|
|
|
/*################*/
|
|
#endif
|
|
/*################*/
|
|
/*===============================================================================
|
|
end end end end end end end end
|
|
===============================================================================*/
|
|
|
|
|
|
|