falling_rising_platform.inc.c (872B)
1 // falling_rising_platform.inc.c 2 3 void bhv_squishable_platform_loop(void) { 4 o->header.gfx.scale[1] = (sins(o->oBitFSPlatformTimer) + 1.0) * 0.3 + 0.4; 5 o->oBitFSPlatformTimer += 0x80; 6 } 7 8 void bhv_bitfs_sinking_platform_loop(void) { 9 //! f32 double conversion error accumulates on Wii VC causing the platform to rise up 10 o->oPosY -= sins(o->oBitFSPlatformTimer) * 0.58; 11 o->oBitFSPlatformTimer += 0x100; 12 } 13 14 // TODO: Named incorrectly. fix 15 void bhv_ddd_moving_pole_loop(void) { 16 obj_copy_pos_and_angle(o, o->parentObj); 17 } 18 19 void bhv_bitfs_sinking_cage_platform_loop(void) { 20 if (o->oBhvParams2ndByte != 0) { 21 if (o->oTimer == 0) { 22 o->oPosY -= 300.0f; 23 } 24 o->oPosY += sins(o->oBitFSPlatformTimer) * 7.0f; 25 } else { 26 o->oPosY -= sins(o->oBitFSPlatformTimer) * 3.0f; 27 } 28 29 o->oBitFSPlatformTimer += 0x100; 30 }