added define for firsty frames

This commit is contained in:
Reonu
2021-07-11 03:44:44 +01:00
parent b770072757
commit 7f513c1253
3 changed files with 12 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Toggle to disable fall damage and the fall damage sound *
- Nonstop stars *
- Removed course-specific camera processing *
- You can increase the number of frames that you have to perform a firsty *
**Hacker QOL:**
- Global, non-level based, star IDs (off by default) *

View File

@@ -74,6 +74,8 @@
#define JUMP_KICK_FIX
// Allow Mario to grab hangable ceilings from any state
#define HANGING_FIX
// The last frame that will be considered a firsty when wallkicking
#define FIRSTY_LAST_FRAME 1
// 46 degree walkicks
//#define WALLKICKS_46_DEGREES
// Disable BLJs and crush SimpleFlips's dreams

View File

@@ -14,6 +14,8 @@
#include "save_file.h"
#include "rumble_init.h"
#include "config.h"
void play_flip_sounds(struct MarioState *m, s16 frame1, s16 frame2, s16 frame3) {
s32 animFrame = m->marioObj->header.gfx.animInfo.animFrame;
if (animFrame == frame1 || animFrame == frame2 || animFrame == frame3) {
@@ -1308,7 +1310,7 @@ s32 act_air_hit_wall(struct MarioState *m) {
mario_drop_held_object(m);
}
if (++(m->actionTimer) <= 2) {
if (++(m->actionTimer) <= FIRSTY_LAST_FRAME) {
if (m->input & INPUT_A_PRESSED) {
m->vel[1] = 52.0f;
m->faceAngle[1] += 0x8000;
@@ -1334,10 +1336,14 @@ s32 act_air_hit_wall(struct MarioState *m) {
return set_mario_action(m, ACT_SOFT_BONK, 0);
}
#ifdef AVOID_UB
/*#ifdef AVOID_UB
return
#endif
#endif*/
#if FIRSTY_LAST_FRAME > 1
set_mario_animation(m, MARIO_ANIM_START_WALLKICK);
#endif
return FALSE;
//! Missing return statement. The returned value is the result of the call
// to set_mario_animation. In practice, this value is nonzero.