Skip to content

Commit

Permalink
add handshake animation for mario
Browse files Browse the repository at this point in the history
seen in cutscenes with CJ and Sweet
  • Loading branch information
headshot2017 committed Feb 20, 2024
1 parent 82b22d7 commit f2cd4d9
Show file tree
Hide file tree
Showing 5 changed files with 809 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mario_cj_anims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,13 @@ void animLaugh01(const int& marioId)
sm64_set_mario_animation(marioId, MARIO_ANIM_CUSTOM_LAUGH01);
}

void animHandshake(const int& marioId)
{
sm64_set_mario_action_arg(marioId, ACT_CUSTOM_ANIM_TO_ACTION, 1);
sm64_set_mario_action_arg2(marioId, ACT_IDLE);
sm64_set_mario_animation(marioId, MARIO_ANIM_CUSTOM_HANDSHAKE);
}

void animDanceLoop(const int& marioId)
{
sm64_set_mario_action_arg(marioId, ACT_CUSTOM_ANIM, 1);
Expand Down Expand Up @@ -341,6 +348,7 @@ std::unordered_map<std::string, ConvertedAnim> cjAnimKeys =
{"CRIB_USE_SWITCH", {animCribUseSwitch, false}},
{"PLYR_SHKHEAD", {animPlayerShakeHead, false}},
{"LAUGH_01", {animLaugh01, false}},
{"HNDSHKFA", {animHandshake, false}},
{"DANCE_LOOP", {animDanceLoop, false}},
{"DANCE_G1", {animDanceGood, false}},
{"DANCE_G2", {animDanceGood, false}},
Expand Down
3 changes: 3 additions & 0 deletions mario_custom_anims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "raw/anim_crib_use_switch.raw.h"
#include "raw/anim_facepalm.raw.h"
#include "raw/anim_laugh01.raw.h"
#include "raw/anim_handshake.raw.h"
#include "raw/anim_dance_loop.raw.h"
#include "raw/anim_dance_bad.raw.h"
#include "raw/anim_dance_good.raw.h"
Expand Down Expand Up @@ -86,6 +87,7 @@ int MARIO_ANIM_CUSTOM_VOMIT;
int MARIO_ANIM_CUSTOM_CRIB_SWITCH;
int MARIO_ANIM_CUSTOM_FACEPALM;
int MARIO_ANIM_CUSTOM_LAUGH01;
int MARIO_ANIM_CUSTOM_HANDSHAKE;
int MARIO_ANIM_CUSTOM_DANCE_LOOP;
int MARIO_ANIM_CUSTOM_DANCE_BAD;
int MARIO_ANIM_CUSTOM_DANCE_GOOD;
Expand Down Expand Up @@ -164,6 +166,7 @@ void marioInitCustomAnims()
MARIO_ANIM_CUSTOM_CRIB_SWITCH = sm64_custom_animation_init(marioAnimCribUseSwitchRaw, marioAnimCribUseSwitchRaw_length);
MARIO_ANIM_CUSTOM_FACEPALM = sm64_custom_animation_init(marioAnimFacepalmRaw, marioAnimFacepalmRaw_length);
MARIO_ANIM_CUSTOM_LAUGH01 = sm64_custom_animation_init(marioAnimLaugh01Raw, marioAnimLaugh01Raw_length);
MARIO_ANIM_CUSTOM_HANDSHAKE = sm64_custom_animation_init(marioAnimHandshakeRaw, marioAnimHandshakeRaw_length);
MARIO_ANIM_CUSTOM_DANCE_LOOP = sm64_custom_animation_init(marioAnimDanceLoopRaw, marioAnimDanceLoopRaw_length);
MARIO_ANIM_CUSTOM_DANCE_BAD = sm64_custom_animation_init(marioAnimDanceBadRaw, marioAnimDanceBadRaw_length);
MARIO_ANIM_CUSTOM_DANCE_GOOD = sm64_custom_animation_init(marioAnimDanceGoodRaw, marioAnimDanceGoodRaw_length);
Expand Down
1 change: 1 addition & 0 deletions mario_custom_anims.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern int MARIO_ANIM_CUSTOM_VOMIT;
extern int MARIO_ANIM_CUSTOM_CRIB_SWITCH;
extern int MARIO_ANIM_CUSTOM_FACEPALM;
extern int MARIO_ANIM_CUSTOM_LAUGH01;
extern int MARIO_ANIM_CUSTOM_HANDSHAKE;
extern int MARIO_ANIM_CUSTOM_DANCE_LOOP;
extern int MARIO_ANIM_CUSTOM_DANCE_BAD;
extern int MARIO_ANIM_CUSTOM_DANCE_GOOD;
Expand Down
Loading

0 comments on commit f2cd4d9

Please sign in to comment.