I have discovered a thing that is a bit confusing for me. I don't have enough experience in client section, however I would like somebody to explain me how this things works.
I'm talking here about connection between files in Root package and client binary. Let's move on to my question.
Okay, let's take a function form IntroLogin.py:
I though that this function has it's definition in NetworkModule.py:
def SetPhaseWindow(self, newPhaseWindow):
print "Already changed to a new window, ", newPhaseWindow
self.newPhaseWindow = newPhaseWindow
print "Change when fade out."
print "Current window does not exist."
But here is a problem with arguments. Function in NetworkModule.py has two parameters, self and newPhaseWindow. So if this definition is from function in IntroLogin.py it would looks like: net.PHASE_WINDOW_LOGIN is a self argument and self (of SetPhaseWindow() function) is newPhaseWindow. I think there is not problem with second argument, but first could not be correct.
So I've been looking for definition in client binary...
Here we go, PythonNetworkStream.cpp:
void CPythonNetworkStream::SetPhaseWindow(UINT ePhaseWnd, PyObject* poPhaseWnd)
if (ePhaseWnd >= PHASE_WINDOW_NUM)
m_apoPhaseWnd[ePhaseWnd] = poPhaseWnd;
Yes, this probably could be that we are searching for, BUT! We have a bit similar function (by name) in PythonNetworkStreamModule.cpp:
And we know that our function is called with net module. So could this be a definition?
PyObject* netSetPhaseWindow(PyObject* poSelf, PyObject* poArgs)
if (!PyTuple_GetInteger(poArgs, 0, &ePhaseWnd))
if (!PyTuple_GetObject(poArgs, 1, &poPhaseWnd))
List of questions:
What does net module do? Where can I find it? Can I compile it by myself?
What definition is from function in IntroLogin.py?
Why there are those two functions in binary? What does each of them do?
Thanks for all replies, regards Chyu ^^.