Add oitg_zoom_mode_actor. Turn off minimaid lights when exiting.
This commit is contained in:
@@ -460,3 +460,17 @@ function GetCodeForGame(codeName)
|
|||||||
local inputCode = CodeDetectorCodes[codeName]
|
local inputCode = CodeDetectorCodes[codeName]
|
||||||
return inputCode[gameName] or inputCode["default"]
|
return inputCode[gameName] or inputCode["default"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function oitg_zoom_mode_actor()
|
||||||
|
return Def.Actor{
|
||||||
|
OnCommand= function(self)
|
||||||
|
local screen= SCREENMAN:GetTopScreen()
|
||||||
|
for i, pn in ipairs(GAMESTATE:GetEnabledPlayers()) do
|
||||||
|
local player= screen:GetChild("Player"..ToEnumShortString(pn))
|
||||||
|
if player and player.set_oitg_zoom_mode then
|
||||||
|
player:set_oitg_zoom_mode(true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|||||||
+16
-3
@@ -236,6 +236,7 @@ Player::Player( NoteData &nd, bool bVisibleParts ) : m_NoteData(nd)
|
|||||||
m_drawing_notefield_board= false;
|
m_drawing_notefield_board= false;
|
||||||
m_bLoaded = false;
|
m_bLoaded = false;
|
||||||
m_inside_lua_set_life= false;
|
m_inside_lua_set_life= false;
|
||||||
|
m_oitg_zoom_mode= false;
|
||||||
|
|
||||||
m_pPlayerState = NULL;
|
m_pPlayerState = NULL;
|
||||||
m_pPlayerStageStats = NULL;
|
m_pPlayerStageStats = NULL;
|
||||||
@@ -922,9 +923,19 @@ void Player::Update( float fDeltaTime )
|
|||||||
Actor::TweenState::MakeWeightedAverage( m_pActorWithComboPosition->DestTweenState(), ts1, ts2, fPercentCentered );
|
Actor::TweenState::MakeWeightedAverage( m_pActorWithComboPosition->DestTweenState(), ts1, ts2, fPercentCentered );
|
||||||
}
|
}
|
||||||
|
|
||||||
float fNoteFieldZoom = 1 - fMiniPercent*0.5f;
|
float field_zoom = 1 - fMiniPercent*0.5f;
|
||||||
if( m_pNoteField )
|
if(m_pNoteField)
|
||||||
m_pNoteField->SetZoom( fNoteFieldZoom );
|
{
|
||||||
|
if(m_oitg_zoom_mode)
|
||||||
|
{
|
||||||
|
m_pNoteField->SetZoomX(field_zoom);
|
||||||
|
m_pNoteField->SetZoomY(field_zoom);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_pNoteField->SetZoom(field_zoom);
|
||||||
|
}
|
||||||
|
}
|
||||||
if( m_pActorWithJudgmentPosition != NULL )
|
if( m_pActorWithJudgmentPosition != NULL )
|
||||||
m_pActorWithJudgmentPosition->SetZoom( m_pActorWithJudgmentPosition->GetZoom() * fJudgmentZoom );
|
m_pActorWithJudgmentPosition->SetZoom( m_pActorWithJudgmentPosition->GetZoom() * fJudgmentZoom );
|
||||||
if( m_pActorWithComboPosition != NULL )
|
if( m_pActorWithComboPosition != NULL )
|
||||||
@@ -3324,6 +3335,7 @@ public:
|
|||||||
p->GetPlayerTimingData().PushSelf(L);
|
p->GetPlayerTimingData().PushSelf(L);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
GET_SET_BOOL_METHOD(oitg_zoom_mode, m_oitg_zoom_mode);
|
||||||
|
|
||||||
LunaPlayer()
|
LunaPlayer()
|
||||||
{
|
{
|
||||||
@@ -3332,6 +3344,7 @@ public:
|
|||||||
ADD_METHOD( SetActorWithJudgmentPosition );
|
ADD_METHOD( SetActorWithJudgmentPosition );
|
||||||
ADD_METHOD( SetActorWithComboPosition );
|
ADD_METHOD( SetActorWithComboPosition );
|
||||||
ADD_METHOD( GetPlayerTimingData );
|
ADD_METHOD( GetPlayerTimingData );
|
||||||
|
ADD_GET_SET_METHODS(oitg_zoom_mode);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,12 @@ public:
|
|||||||
|
|
||||||
void SetSendJudgmentAndComboMessages( bool b ) { m_bSendJudgmentAndComboMessages = b; }
|
void SetSendJudgmentAndComboMessages( bool b ) { m_bSendJudgmentAndComboMessages = b; }
|
||||||
|
|
||||||
|
// OITG bug: Actor::SetZoom only sets X and Y. When mini is applied to
|
||||||
|
// the notefield with SetZoom, it does not affect the range of bumpy.
|
||||||
|
// m_oitg_zoom_mode provides compatibility with that bug. Only used in
|
||||||
|
// defective mode. -Kyz
|
||||||
|
bool m_oitg_zoom_mode;
|
||||||
|
|
||||||
// Lua
|
// Lua
|
||||||
virtual void PushSelf( lua_State *L );
|
virtual void PushSelf( lua_State *L );
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ LightsDriver_LinuxMinimaid::LightsDriver_LinuxMinimaid()
|
|||||||
|
|
||||||
LightsDriver_LinuxMinimaid::~LightsDriver_LinuxMinimaid()
|
LightsDriver_LinuxMinimaid::~LightsDriver_LinuxMinimaid()
|
||||||
{
|
{
|
||||||
|
if(_mmmagic_loaded)
|
||||||
|
{
|
||||||
|
mm_setDDRAllOff();
|
||||||
|
}
|
||||||
// libmmmagic is actually statically linked in, so there's no wrapper
|
// libmmmagic is actually statically linked in, so there's no wrapper
|
||||||
// destruction to do. -Kyz
|
// destruction to do. -Kyz
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ LightsDriver_Win32Minimaid::~LightsDriver_Win32Minimaid()
|
|||||||
{
|
{
|
||||||
if (_mmmagic_loaded)
|
if (_mmmagic_loaded)
|
||||||
{
|
{
|
||||||
|
mm_setDDRAllOff();
|
||||||
FreeLibrary(hMMMAGICDLL);
|
FreeLibrary(hMMMAGICDLL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user