Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mm/2s2h/BenGui/BenMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

extern "C" {
#include "z64.h"
#include "macros.h"
#include "functions.h"
extern PlayState* gPlayState;
extern SaveContext gSaveContext;
}

static const std::unordered_map<int32_t, const char*> textureFilteringMap = {
Expand Down Expand Up @@ -600,6 +602,14 @@ void DrawCheatsMenu() {
RegisterMoonJumpOnL();
}
UIWidgets::CVarCheckbox("No Clip", "gCheats.NoClip");
if (gPlayState != NULL && gPlayState->sceneId == SCENE_INISIE_R || gPlayState->sceneId == SCENE_INISIE_N) {
if (UIWidgets::Button("Flip Stone Tower")) {
Player* player = GET_PLAYER(gPlayState);
Actor_Spawn(&gPlayState->actorCtx, gPlayState, ACTOR_OBJ_WTURN, player->actor.world.pos.x,
player->actor.world.pos.y, player->actor.world.pos.z, player->actor.world.rot.x,
player->actor.world.rot.y, player->actor.world.rot.z, 0);
}
}

ImGui::EndMenu();
}
Expand Down
29 changes: 22 additions & 7 deletions mm/src/overlays/actors/ovl_Obj_Wturn/z_obj_wturn.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ void ObjWturn_Init(Actor* thisx, PlayState* play) {
ObjWturn* this = THIS;

func_808A7954(this);
if (play->sceneId != SCENE_F40 && play->sceneId != SCENE_F41) {
func_808A7A24(this);
}
}

void func_808A7954(ObjWturn* this) {
Expand Down Expand Up @@ -119,15 +122,27 @@ void func_808A7C78(ObjWturn* this, PlayState* play) {
player->actor.world.pos.y = this->actor.world.pos.y + this->unk_14A * 4.0f;
Play_SetCameraAtEyeUp(play, this->subCamId, &player->actor.focus.pos, &subCam->eye, &sSubCamUp);
if (this->unk_14A == 1) {
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextCutsceneIndex = 0;
if (play->sceneId == SCENE_F40) {
play->nextEntrance = ENTRANCE(STONE_TOWER_INVERTED, 0);
if (play->sceneId != SCENE_F40 && play->sceneId != SCENE_F41) {
Vec3f pos = player->actor.world.pos;
pos.y *= -1;
pos.y += -50.0f;
u32 entrance = gPlayState->sceneId == SCENE_INISIE_R ? ENTRANCE(STONE_TOWER_TEMPLE, 0)
: ENTRANCE(STONE_TOWER_TEMPLE_INVERTED, 0);
Play_SetRespawnData(&gPlayState->state, RESPAWN_MODE_DOWN, entrance, gPlayState->roomCtx.curRoom.num,
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_D), &pos, player->actor.shape.rot.y);
func_80169EFC(&gPlayState->state);
gSaveContext.respawnFlag = -8;
} else {
play->nextEntrance = ENTRANCE(STONE_TOWER, 1);
play->transitionType = TRANS_TYPE_64;
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
gSaveContext.nextCutsceneIndex = 0;
if (play->sceneId == SCENE_F40) {
play->nextEntrance = ENTRANCE(STONE_TOWER_INVERTED, 0);
} else {
play->nextEntrance = ENTRANCE(STONE_TOWER, 1);
}
play->transitionTrigger = TRANS_TRIGGER_START;
}
play->transitionTrigger = TRANS_TRIGGER_START;
}
}

Expand Down