Add goddard as togglable and stop linking segments seperately

This commit is contained in:
CrashOveride95
2021-03-28 20:54:54 -04:00
parent 359ba19531
commit ea6c7d60e1
61 changed files with 28019 additions and 67 deletions

View File

@@ -12,6 +12,7 @@
#include "engine/math_util.h"
#include "envfx_snow.h"
#include "game_init.h"
#include "goddard/renderer.h"
#include "interaction.h"
#include "level_update.h"
#include "mario_misc.h"
@@ -77,6 +78,29 @@ struct GraphNodeObject gMirrorMario; // copy of Mario's geo node for drawing mi
// (message NPC related things, the Mario head geo, and Mario geo
// functions)
#ifdef GODDARD
/**
* Geo node script that draws Mario's head on the title screen.
*/
Gfx *geo_draw_mario_head_goddard(s32 callContext, struct GraphNode *node, Mat4 *c) {
Gfx *gfx = NULL;
s16 sfx = 0;
struct GraphNodeGenerated *asGenerated = (struct GraphNodeGenerated *) node;
UNUSED Mat4 *transform = c;
if (callContext == GEO_CONTEXT_RENDER) {
if (gPlayer1Controller->controllerData != NULL && !gWarpTransition.isActive) {
gd_copy_p1_contpad(gPlayer1Controller->controllerData);
}
gfx = (Gfx *) PHYSICAL_TO_VIRTUAL(gdm_gettestdl(asGenerated->parameter));
gGoddardVblankCallback = gd_vblank;
sfx = gd_sfx_to_play();
play_menu_sounds(sfx);
}
return gfx;
}
#endif
static void toad_message_faded(void) {
if (gCurrentObject->oDistanceToMario > 700.0f) {
gCurrentObject->oToadMessageRecentlyTalked = FALSE;