Game.cpp:
find:
Code: Select all
short _tmp_sOwnerType, _tmp_sAppr1, _tmp_sAppr2, _tmp_sAppr3, _tmp_sAppr4;//, _tmp_iStatus;
//CInt _tmp_iStatus;
int _tmp_iStatus;
char _tmp_cAction, _tmp_cDir, _tmp_cFrame, _tmp_cName[12];
int _tmp_iChatIndex, _tmp_dx, _tmp_dy, _tmp_iApprColor, _tmp_iEffectType, _tmp_iEffectFrame, _tmp_dX, _tmp_dY; // 21.171 2002-6-14
WORD _tmp_wObjectID;
char cDynamicObjectData1, cDynamicObjectData2, cDynamicObjectData3, cDynamicObjectData4;
WORD wFocusObjectID;
short sFocus_dX, sFocus_dY;
char cFocusAction, cFocusFrame, cFocusDir, cFocusName[12];
short sFocusX, sFocusY, sFocusOwnerType, sFocusAppr1, sFocusAppr2, sFocusAppr3, sFocusAppr4;
int iFocuiStatus;
int iFocusApprColor;
Code: Select all
void (CGame::*UpdateScreen_ptr)(void);
UpdateScreen replace by:
Code: Select all
void CGame::UpdateScreen()
{
G_dwGlobalTime = timeGetTime();
(*this.*UpdateScreen_ptr)();
#ifdef DEF_USING_WIN_IME
if (GetAsyncKeyState(VK_RETURN) != NULL) m_cEnterCheck = 1;
if ((m_cEnterCheck == 1) && (GetAsyncKeyState(VK_RETURN) == NULL))
{ m_bEnterPressed = TRUE;
m_cEnterCheck = NULL;
}
if (GetAsyncKeyState(VK_TAB) != NULL) m_cTabCheck = 1;
if ((m_cTabCheck == 1) && (GetAsyncKeyState(VK_TAB) == NULL))
{ m_cCurFocus++;
if( m_cCurFocus > m_cMaxFocus) m_cCurFocus = 1;
if (m_cGameMode == DEF_GAMEMODE_ONMAINGAME) bSendCommand(MSGID_COMMAND_COMMON, DEF_COMMONTYPE_TOGGLECOMBATMODE, NULL, NULL, NULL, NULL, NULL);
m_cTabCheck = NULL;
}
if( m_bInputStatus )
{ if (GetAsyncKeyState(VK_LEFT) != NULL) m_cLeftArrowCheck = 1;
if ((m_cLeftArrowCheck == 1) && (GetAsyncKeyState(VK_LEFT) == NULL))
{ m_cLeftArrowCheck = NULL;
if( G_hEditWnd != NULL )
{ int iStrLen = strlen(m_pInputBuffer);
SendMessage( G_hEditWnd, EM_SETSEL, iStrLen, iStrLen );
} } }
#endif
}
Code: Select all
void CGame::ChangeGameMode(char cMode)
{
m_cGameMode = cMode;
m_cGameModeCount = 0;
m_dwTime = G_dwGlobalTime;
switch (m_cGameMode) {
#ifdef DEF_MAKE_ACCOUNT
case DEF_GAMEMODE_ONAGREEMENT:
// UpdateScreen_OnAgreement(); //unused by HBx server..
break;
case DEF_GAMEMODE_ONCREATENEWACCOUNT:
UpdateScreen_ptr=UpdateScreen_OnCreateNewAccount;
break;
#endif
case DEF_GAMEMODE_ONVERSIONNOTMATCH:
UpdateScreen_ptr=UpdateScreen_OnVersionNotMatch;
break;
case DEF_GAMEMODE_ONCONNECTING:
UpdateScreen_ptr=UpdateScreen_OnConnecting;
break;
case DEF_GAMEMODE_ONMAINMENU:
UpdateScreen_ptr=UpdateScreen_OnMainMenu;
break;
case DEF_GAMEMODE_ONLOADING: //bug
UpdateScreen_OnLoading_Progress;//(TRUE);
break;
case DEF_GAMEMODE_ONMAINGAME:
UpdateScreen_ptr=UpdateScreen_OnGame;
break;
case DEF_GAMEMODE_ONWAITINGINITDATA:
UpdateScreen_ptr=UpdateScreen_OnWaitInitData;
break;
case DEF_GAMEMODE_ONCONNECTIONLOST:
UpdateScreen_ptr=UpdateScreen_OnConnectionLost;
break;
case DEF_GAMEMODE_ONMSG:
UpdateScreen_ptr=UpdateScreen_OnMsg;
break;
case DEF_GAMEMODE_ONLOGIN:
UpdateScreen_ptr=UpdateScreen_OnLogin;
break;
case DEF_GAMEMODE_ONSELECTSERVER:
UpdateScreen_ptr=UpdateScreen_OnSelectServer;
break;
case DEF_GAMEMODE_ONQUIT:
UpdateScreen_ptr=UpdateScreen_OnQuit;
break;
case DEF_GAMEMODE_ONQUERYFORCELOGIN:
UpdateScreen_ptr=UpdateScreen_OnQueryForceLogin;
break;
case DEF_GAMEMODE_ONSELECTCHARACTER:
UpdateScreen_ptr=UpdateScreen_OnSelectCharacter;
break;
case DEF_GAMEMODE_ONCREATENEWCHARACTER:
UpdateScreen_ptr=UpdateScreen_OnCreateNewCharacter;
break;
case DEF_GAMEMODE_ONWAITINGRESPONSE:
UpdateScreen_ptr=UpdateScreen_OnWaitingResponse;
break;
case DEF_GAMEMODE_ONQUERYDELETECHARACTER:
UpdateScreen_ptr=UpdateScreen_OnQueryDeleteCharacter;
break;
case DEF_GAMEMODE_ONLOGRESMSG:
UpdateScreen_ptr=UpdateScreen_OnLogResMsg;
break;
case DEF_GAMEMODE_ONCHANGEPASSWORD:
UpdateScreen_ptr=UpdateScreen_OnChangePassword;
break;
}
(*this.*UpdateScreen_ptr)();
#ifndef DEF_SELECTSERVER
if( cMode == DEF_GAMEMODE_ONSELECTSERVER )
{ ZeroMemory(m_cWorldServerName, sizeof(m_cWorldServerName));
strcpy(m_cWorldServerName, NAME_WORLDNAME1);
m_cGameMode = DEF_GAMEMODE_ONLOGIN;
UpdateScreen_ptr = UpdateScreen_OnLogin;
}
#endif
}
Code: Select all
m_cGameMode = DEF_GAMEMODE_ONLOADING;
Code: Select all
UpdateScreen_ptr=UpdateScreen_OnLoading_Progress;
(*this.*UpdateScreen_ptr)();
- Mouse isnt showing
- Keyboard (?)
- If I login into game then client crash.
Help and post your fixes here
:rolleyes: