X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMapState.cpp;h=af156304b9412c6523e7aec39f7b0547e6fadd3f;hb=350055a7ff27c74882aff8a4d6af2014782f830b;hp=500acea60623b5dd464d99f62ebbdff24848165d;hpb=5ca18f73987fb3935ab34654cbbecf5eca4704cb;p=l2e.git diff --git a/src/map/MapState.cpp b/src/map/MapState.cpp index 500acea..af15630 100644 --- a/src/map/MapState.cpp +++ b/src/map/MapState.cpp @@ -17,6 +17,7 @@ #include "../common/GameConfig.h" #include "../common/GameState.h" #include "../graphics/ColorFade.h" +#include "../menu/PartyMenu.h" #include @@ -26,6 +27,7 @@ using battle::BattleState; using common::GameConfig; using geometry::Vector; using graphics::ColorFade; +using menu::PartyMenu; namespace map { @@ -69,6 +71,11 @@ void MapState::OnResize(int width, int height) { void MapState::HandleEvents(const Input &input) { + if (input.JustPressed(Input::ACTION_X)) { + Ctrl().PushState(new PartyMenu(game)); + return; + } + if (!controlled) return; if (input.IsDown(Input::PAD_UP)) { @@ -441,10 +448,10 @@ bool MapState::ZCompare(const Entity *lhs, const Entity *rhs) { void MapState::HandleSyscall(common::ScriptRunner &r) { - switch (r.Integer0()) { + switch (r.IntegerRegister(0)) { case TRANSITION: { Ctrl().PushState(new ColorFade(this, 0, 500, true)); - Ctrl().PushState(new TransitionState(this, reinterpret_cast(r.Address0()), r.Vector0())); + Ctrl().PushState(new TransitionState(this, reinterpret_cast(r.AddressRegister(0)), r.VectorRegister(0))); ColorFade *fadeOut(new ColorFade(this, 0, 500, false)); fadeOut->SetLeadOutTime(500); Ctrl().PushState(fadeOut);