summaryrefslogtreecommitdiff
path: root/mm/2s2h/Enhancements/Fixes/FixButtonEnvColor.cpp
blob: 541524ba49d36b0d3d844ab297a8ca6762ae23db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <libultraship/bridge/consolevariablebridge.h>
#include "2s2h/GameInteractor/GameInteractor.h"
#include "2s2h/Enhancements/FrameInterpolation/FrameInterpolation.h"
#include "2s2h/ShipInit.hpp"

#define CVAR_NAME "gFixes.FixButtonEnvColor"
#define CVAR CVarGetInteger(CVAR_NAME, 0)

void RegisterFixButtonEnvColor() {
    COND_VB_SHOULD(VB_SET_BUTTON_ENV_COLOR, CVAR, {
        OPEN_DISPS(gPlayState->state.gfxCtx);
        gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 255);
        CLOSE_DISPS(gPlayState->state.gfxCtx);
    });
}

static RegisterShipInitFunc initFunc(RegisterFixButtonEnvColor, { CVAR_NAME });