Dolphin, the GameCube and Wii emulator - Forums

Full Version: AFC Looping Checkbox for DSP Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9

LuisR14

no :p (patch isn't finished yet Big Grin)

E:
(02-03-2010, 07:25 AM)James333 Wrote: [ -> ]
(02-03-2010, 04:43 AM)Xtreme2damax Wrote: [ -> ]
Code:
if (!g_Config.m_EnableAFCLoopingHack || g_Config.m_EnableAFCLoopingHack && PB.RepeatMode == 0)
well there is just a problem with that line, let me give them as examples :p

line above is equal:
Code:
if (!g_Config.m_EnableAFCLoopingHack || (g_Config.m_EnableAFCLoopingHack && PB.RepeatMode == 0))

so if m_EnableAFCLoopingHack is true and RepeatMode is 0 then the line above would be
Code:
if (false || (true && true))
which then evaluates to
Code:
if (false || true) which equals true
which then you wouldn't get what you wanted (the AFC loop)

now if m_EnableAFCLoopingHack is false and RepeatMode is 0 then it would be
Code:
if (true || (false && true))
and then it would evaluate to
Code:
if (true || false) which is true (as well)
this time you wouldn't get the AFC loop (as expected from it being false :p)

then if m_EnableAFCLoopingHack is true and RepeatMode is not 0 then it would come out as
Code:
if (false || (true && false)) ...
if (false || false) equals false
this time you would get it (as expected) but then

when m_EnableAFCLoopingHack is false and RepeatMode is not 0
Code:
if (true || (false && false)) ...
if (true || false) equals true
you wouldn't get it to loop (again for the 3rd tiime, but at least it was expected :p)

so your method wouldn't work very well xD
And Why not just something like this? :

Code:
if (!(g_Config.m_EnableAFCLoopingHack || g_GConfig.m_EnableAFCLoopingHack) || (PB.RepeatMode == 0))

Anyway before the patch it was

Code:
if (true || (PB.RepeatMode == 0))
So it never go to the "else" above. But making it like

Code:
if (!(g_Config.m_EnableAFCLoopingHack || g_GConfig.m_EnableAFCLoopingHack) || (PB.RepeatMode == 0))

and make those two
Code:
if ((false || false) || (PB.RepeatMode == 0))
Would make it a PB.RepeatMode choise as the original coment said

LuisR14

hmm, thought of every possible output and that works o_o Smile (i also found a less confusing way :p)

E: even though it has outputs that you wouldn't want it still works out as wanted :p
(02-03-2010, 08:11 PM)LuisR14 Wrote: [ -> ]well in the v2 patch i fixed the gameini :p

look carefully Smile
Quote:if (!(g_Config.m_EnableAFCLoopingHack || g_GConfig.m_EnableAFCLoopingHack) && (PB.RepeatMode == 0))
(also look at Config.cpp/.h :p)

Yeah I figured that out..

I'm sorry, I'm just not good with coding, I need to hone my skills. I spent hours just trying to solve simple errors. At least I got most of the work completed. Tongue
So.. How we will leave it ? Tongue
I'm still working on it, I think I'm closer to working out all the quirks.
lol good luck with dolphin coding Tongue I think hacks are pointless.
Yeah, I'm trying to learn. I agree that hacks are pointless, but this is all we have until proper AFC looping can be implemented..

I modified the code a bit, can anyone tell me how to fix these errors?

Code:
Error    1    error LNK2019: unresolved external symbol "public: __thiscall GConfig::GConfig(void)" (??0GConfig@@QAE@XZ) referenced in function "void __cdecl `dynamic initializer for 'g_GConfig''(void)" (??__Eg_GConfig@@YAXXZ)    Config.obj

Error    2    fatal error LNK1120: 1 unresolved externals    ../../../Binary/Win32/Plugins/Plugin_DSP_HLE.dll

Thank you. Smile
What exactly did you do ?
By looking at your C++ decorations, the parameter lists are not matching. Better check the prototype against its declared function in the cpp file.
Pages: 1 2 3 4 5 6 7 8 9