New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

creating hidden window for messages #5

Merged
merged 9 commits into from May 7, 2016

cleanup

  • Loading branch information...
pawelsawicz committed May 4, 2016
commit debbdd96228fae00f0322bcc86004f5c88dd98fe
@@ -7545,7 +7545,6 @@ void CGame::MsgProcess()
break;
case MSGID_NPCCONFIGURATIONCONTENTS:
PutLogList("(!) NPC configuration contents received. Now decoding...");
m_bIsNpcAvailable = _bDecodeNpcConfigFileContents((char *)(pData + INDEX2_MSGTYPE + 2), dwMsgSize);
break;
@@ -2,6 +2,7 @@
#include "..\HG.h"
#include "Unit.h"
#include "../DelayedEvents.h"
extern class CGame * g_game;
extern class CMagic ** g_magicConfigList;
extern class CClient ** g_clientList;
@@ -67,33 +67,7 @@ struct sMsg
BYTE MsgLvl[MAXLOGMSGS];
WORD CurMsg;
}LogMsg;
//=============================================================================
void Initialize()
{
if (_InitWinsock() == FALSE) {
MessageBox(G_hWnd, "Socket 1.1 not found! Cannot execute program.","ERROR", MB_ICONEXCLAMATION | MB_OK);
PostQuitMessage(0);
return;
}
g_game = new class CGame(G_hWnd);
if (g_game->bInit() == FALSE) {
PutLogList("(!!!) STOPPED!");
return;
}
SetPriorityClass( GetCurrentProcess(), ABOVE_NORMAL_PRIORITY_CLASS );
//G_mmTimer = _StartTimer(TICKDELAY);
G_pListenSock = new class XSocket(G_hWnd, SERVERSOCKETBLOCKLIMIT);
G_pListenSock->bListen(g_game->m_cGameServerAddr, g_game->m_iGameServerPort, WM_USER_ACCEPT);
G_sLogCounter = 0 ;
ZeroMemory(G_cLogBuffer, sizeof(G_cLogBuffer));
}
//=============================================================================
void OnDestroy()
{
@@ -10,18 +10,11 @@
void Assertion(const char * assertion, const char * file, const uint32 line);
#define ASSERT(assertion) { if( !(assertion) ) { Assertion(#assertion, __FILE__, __LINE__); assert( assertion &&0); } }
bool InitApplication( HINSTANCE hInstance);
bool InitInstance( HINSTANCE hInstance, int nCmdShow );
LRESULT CALLBACK WndProc( HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam );
void OnAccept();
void OnKeyUp(WPARAM wParam, LPARAM lParam);
void UpdateScreen();
int EventLoop();
void OnPaint();
void OnDestroy();
void Initialize();
void CALLBACK _TimerFunc(UINT wID, UINT wUser, DWORD dwUSer, DWORD dw1, DWORD dw2);
MMRESULT _StartTimer(DWORD dwTime);
void _StopTimer(MMRESULT timerid);
void PutLogFileList(const char * cStr, char *FileName = NULL);
//void PutLogList(char * cMsg, BYTE MsgLvl = NULL, bool PutOnFile = FALSE, char *FileName = NULL);
@@ -36,6 +29,5 @@ WORD wGetOffsetValue(char * cp, DWORD offset);
DWORD dwGetOffsetValue(char * cp, DWORD offset);
uint64 ullGetOffsetValue(char * cp, DWORD offset);
void PutOffsetValue(char * cp, DWORD offset, BYTE size, uint64 value);
void parseCommand(char* pMsg);
#endif