Skip to content

Commit

Permalink
WIP wiimote tas input. Code mostly from bzb95.
Browse files Browse the repository at this point in the history
  • Loading branch information
RachelBryk committed Sep 15, 2014
1 parent 74f8a48 commit c5ba452
Show file tree
Hide file tree
Showing 5 changed files with 577 additions and 979 deletions.
6 changes: 2 additions & 4 deletions Source/Core/DolphinWX/Frame.cpp
Expand Up @@ -393,10 +393,8 @@ CFrame::CFrame(wxFrame* parent,
m_LogWindow->Hide();
m_LogWindow->Disable();

g_TASInputDlg[0] = new TASInputDlg(this);
g_TASInputDlg[1] = new TASInputDlg(this);
g_TASInputDlg[2] = new TASInputDlg(this);
g_TASInputDlg[3] = new TASInputDlg(this);
for (int i = 0; i < 8; ++i)
g_TASInputDlg[i] = new TASInputDlg(this);

Movie::SetInputManip(TASManipFunction);

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinWX/Frame.h
Expand Up @@ -98,7 +98,7 @@ class CFrame : public CRenderFrame
CCodeWindow* g_pCodeWindow;
NetPlaySetupDiag* g_NetPlaySetupDiag;
wxCheatsWindow* g_CheatsWindow;
TASInputDlg* g_TASInputDlg[4];
TASInputDlg* g_TASInputDlg[8];

void InitBitmaps();
void DoPause();
Expand Down
7 changes: 7 additions & 0 deletions Source/Core/DolphinWX/FrameTools.cpp
Expand Up @@ -671,9 +671,16 @@ void CFrame::OnTASInput(wxCommandEvent& event)
{
if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER || SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_TARUKONGA)
{
g_TASInputDlg[i]->CreateGCLayout();
g_TASInputDlg[i]->Show(true);
g_TASInputDlg[i]->SetTitle("TAS Input - Controller " + number[i]);
}
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU)
{
g_TASInputDlg[i+4]->CreateWiiLayout();
g_TASInputDlg[i+4]->Show(true);
g_TASInputDlg[i+4]->SetTitle("TAS Input - Wiimote " + number[i]);
}
}
}

Expand Down

5 comments on commit c5ba452

@bzb95
Copy link

@bzb95 bzb95 commented on c5ba452 Sep 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see you have found some time to work on this! It might be worth it to change a few variables like "wii" to "isWii" and "created" to "hasLayout" or something of that nature.

Other than that(which are my mistakes) looks good. It will be nice not to get emails begging me to implement this :P

@RachelBryk
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is just my first pass through it. Was lots of changes to go through. Thanks for sharing the code, i wish you did sooner!

@bzb95
Copy link

@bzb95 bzb95 commented on c5ba452 Sep 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had been trying to pawn the code off on everyone who asked.

Also something I think would make the code look cleaner is if we got rid of all the enum constants except ID_MAIN_STICK and ID_GC_C_STICK. All the other ones can just be set to elementId++ each time. Which would save us from having to pass 5 variables like in TASInputDlg::CreateStick(int id_stick, int id_xSlider, int id_ySlider, int id_xText, int id_yText).

However, I don't know if everyone would agree with me on that one. Some people might like the enum even if its unnecessary.

@bzb95
Copy link

@bzb95 bzb95 commented on c5ba452 Sep 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promise to leave you alone after this, but here is a patch doing what I said above and a few other things. Feel free to not use it if you like the enum better.

https://www.mediafire.com/?e2j8d9b8g4najbj

@RachelBryk
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, i didn't like the idea, but i guess it's okay. Thanks for that.

Please sign in to comment.