1
0
forked from metin2/client

Removed Armadillo Nanomite

This commit is contained in:
2025-04-13 09:14:17 +03:00
parent 1e96dae60b
commit 363f729f5d
18 changed files with 97 additions and 327 deletions

View File

@ -25,7 +25,6 @@ int MULTI_LOCALE_CODE = 1252;
void LocaleService_LoadConfig(const char* fileName)
{
NANOBEGIN
FILE* fp = fopen(fileName, "rt");
if (fp)
@ -44,7 +43,6 @@ void LocaleService_LoadConfig(const char* fileName)
}
fclose(fp);
}
NANOEND
}
unsigned LocaleService_GetLastExp(int level)

View File

@ -978,8 +978,7 @@ void CPythonApplication::Loop()
// SUPPORT_NEW_KOREA_SERVER
bool LoadLocaleData(const char* localePath)
{
NANOBEGIN
CPythonNonPlayer& rkNPCMgr = CPythonNonPlayer::Instance();
CPythonNonPlayer& rkNPCMgr = CPythonNonPlayer::Instance();
CItemManager& rkItemMgr = CItemManager::Instance();
CPythonSkill& rkSkillMgr = CPythonSkill::Instance();
CPythonNetworkStream& rkNetStream = CPythonNetworkStream::Instance();
@ -1055,8 +1054,7 @@ bool LoadLocaleData(const char* localePath)
}
}
NANOEND
return true;
return true;
}
// END_OF_SUPPORT_NEW_KOREA_SERVER
@ -1070,8 +1068,7 @@ unsigned __GetWindowMode(bool windowed)
bool CPythonApplication::Create(PyObject * poSelf, const char * c_szName, int width, int height, int Windowed)
{
NANOBEGIN
Windowed = CPythonSystem::Instance().IsWindowed() ? 1 : 0;
Windowed = CPythonSystem::Instance().IsWindowed() ? 1 : 0;
bool bAnotherWindow = false;
@ -1135,115 +1132,114 @@ bool CPythonApplication::Create(PyObject * poSelf, const char * c_szName, int wi
}
}
NANOEND
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Cursor
if (!CreateCursors())
// Cursor
if (!CreateCursors())
{
//PyErr_SetString(PyExc_RuntimeError, "CMSWindow::Cursors Create Error");
TraceError("CMSWindow::Cursors Create Error");
SET_EXCEPTION("CREATE_CURSOR");
return false;
}
if (!m_pySystem.IsNoSoundCard())
{
// Sound
if (!m_SoundManager.Create())
{
//PyErr_SetString(PyExc_RuntimeError, "CMSWindow::Cursors Create Error");
TraceError("CMSWindow::Cursors Create Error");
SET_EXCEPTION("CREATE_CURSOR");
return false;
// NOTE : 중국측의 요청으로 생략
// LogBox(ApplicationStringTable_GetStringz(IDS_WARN_NO_SOUND_DEVICE));
}
}
if (!m_pySystem.IsNoSoundCard())
extern bool GRAPHICS_CAPS_SOFTWARE_TILING;
if (!m_pySystem.IsAutoTiling())
GRAPHICS_CAPS_SOFTWARE_TILING = m_pySystem.IsSoftwareTiling();
// Device
if (!CreateDevice(m_pySystem.GetWidth(), m_pySystem.GetHeight(), Windowed, m_pySystem.GetBPP(), m_pySystem.GetFrequency()))
return false;
GrannyCreateSharedDeformBuffer();
if (m_pySystem.IsAutoTiling())
{
if (m_grpDevice.IsFastTNL())
{
// Sound
if (!m_SoundManager.Create())
{
// NOTE : 중국측의 요청으로 생략
// LogBox(ApplicationStringTable_GetStringz(IDS_WARN_NO_SOUND_DEVICE));
}
}
extern bool GRAPHICS_CAPS_SOFTWARE_TILING;
if (!m_pySystem.IsAutoTiling())
GRAPHICS_CAPS_SOFTWARE_TILING = m_pySystem.IsSoftwareTiling();
// Device
if (!CreateDevice(m_pySystem.GetWidth(), m_pySystem.GetHeight(), Windowed, m_pySystem.GetBPP(), m_pySystem.GetFrequency()))
return false;
GrannyCreateSharedDeformBuffer();
if (m_pySystem.IsAutoTiling())
{
if (m_grpDevice.IsFastTNL())
{
m_pyBackground.ReserveSoftwareTilingEnable(false);
}
else
{
m_pyBackground.ReserveSoftwareTilingEnable(true);
}
m_pyBackground.ReserveSoftwareTilingEnable(false);
}
else
{
m_pyBackground.ReserveSoftwareTilingEnable(m_pySystem.IsSoftwareTiling());
m_pyBackground.ReserveSoftwareTilingEnable(true);
}
}
else
{
m_pyBackground.ReserveSoftwareTilingEnable(m_pySystem.IsSoftwareTiling());
}
SetVisibleMode(true);
SetVisibleMode(true);
if (m_isWindowFullScreenEnable) //m_pySystem.IsUseDefaultIME() && !m_pySystem.IsWindowed())
{
SetWindowPos(GetWindowHandle(), HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW);
}
if (m_isWindowFullScreenEnable) //m_pySystem.IsUseDefaultIME() && !m_pySystem.IsWindowed())
{
SetWindowPos(GetWindowHandle(), HWND_TOP, 0, 0, width, height, SWP_SHOWWINDOW);
}
if (!InitializeKeyboard(GetWindowHandle()))
return false;
if (!InitializeKeyboard(GetWindowHandle()))
return false;
m_pySystem.GetDisplaySettings();
m_pySystem.GetDisplaySettings();
// Mouse
if (m_pySystem.IsSoftwareCursor())
SetCursorMode(CURSOR_MODE_SOFTWARE);
else
SetCursorMode(CURSOR_MODE_HARDWARE);
// Mouse
if (m_pySystem.IsSoftwareCursor())
SetCursorMode(CURSOR_MODE_SOFTWARE);
else
SetCursorMode(CURSOR_MODE_HARDWARE);
// Network
if (!m_netDevice.Create())
{
//PyErr_SetString(PyExc_RuntimeError, "NetDevice::Create failed");
TraceError("NetDevice::Create failed");
SET_EXCEPTION("CREATE_NETWORK");
return false;
}
// Network
if (!m_netDevice.Create())
{
//PyErr_SetString(PyExc_RuntimeError, "NetDevice::Create failed");
TraceError("NetDevice::Create failed");
SET_EXCEPTION("CREATE_NETWORK");
return false;
}
if (!m_grpDevice.IsFastTNL())
CGrannyLODController::SetMinLODMode(true);
if (!m_grpDevice.IsFastTNL())
CGrannyLODController::SetMinLODMode(true);
m_pyItem.Create();
m_pyItem.Create();
// Other Modules
DefaultFont_Startup();
// Other Modules
DefaultFont_Startup();
CPythonIME::Instance().Create(GetWindowHandle());
CPythonIME::Instance().SetText("", 0);
CPythonTextTail::Instance().Initialize();
CPythonIME::Instance().Create(GetWindowHandle());
CPythonIME::Instance().SetText("", 0);
CPythonTextTail::Instance().Initialize();
// Light Manager
m_LightManager.Initialize();
// Light Manager
m_LightManager.Initialize();
CGraphicImageInstance::CreateSystem(32);
CGraphicImageInstance::CreateSystem(32);
// 백업
STICKYKEYS sStickKeys;
memset(&sStickKeys, 0, sizeof(sStickKeys));
sStickKeys.cbSize = sizeof(sStickKeys);
SystemParametersInfo( SPI_GETSTICKYKEYS, sizeof(sStickKeys), &sStickKeys, 0 );
m_dwStickyKeysFlag = sStickKeys.dwFlags;
// 백업
STICKYKEYS sStickKeys;
memset(&sStickKeys, 0, sizeof(sStickKeys));
sStickKeys.cbSize = sizeof(sStickKeys);
SystemParametersInfo( SPI_GETSTICKYKEYS, sizeof(sStickKeys), &sStickKeys, 0 );
m_dwStickyKeysFlag = sStickKeys.dwFlags;
// 설정
sStickKeys.dwFlags &= ~(SKF_AVAILABLE|SKF_HOTKEYACTIVE);
SystemParametersInfo( SPI_SETSTICKYKEYS, sizeof(sStickKeys), &sStickKeys, 0 );
// 설정
sStickKeys.dwFlags &= ~(SKF_AVAILABLE|SKF_HOTKEYACTIVE);
SystemParametersInfo( SPI_SETSTICKYKEYS, sizeof(sStickKeys), &sStickKeys, 0 );
// SphereMap
CGrannyMaterial::CreateSphereMap(0, "d:/ymir work/special/spheremap.jpg");
CGrannyMaterial::CreateSphereMap(1, "d:/ymir work/special/spheremap01.jpg");
return true;
// SphereMap
CGrannyMaterial::CreateSphereMap(0, "d:/ymir work/special/spheremap.jpg");
CGrannyMaterial::CreateSphereMap(1, "d:/ymir work/special/spheremap01.jpg");
return true;
}
void CPythonApplication::SetGlobalCenterPosition(LONG x, LONG y)

View File

@ -4,7 +4,6 @@
bool CPythonApplication::CreateCursors()
{
NANOBEGIN
m_bCursorVisible = TRUE;
m_bLiarCursorOn = false;
@ -41,7 +40,6 @@ bool CPythonApplication::CreateCursors()
m_CursorHandleMap.insert(TCursorHandleMap::value_type(i, hCursor));
}
NANOEND
return true;
}

View File

@ -763,7 +763,6 @@ DWORD CPythonNetworkStream::GetEmpireID()
void CPythonNetworkStream::__ClearSelectCharacterData()
{
NANOBEGIN
memset(&m_akSimplePlayerInfo, 0, sizeof(m_akSimplePlayerInfo));
for (int i = 0; i < PLAYER_PER_ACCOUNT4; ++i)
@ -771,7 +770,6 @@ void CPythonNetworkStream::__ClearSelectCharacterData()
m_adwGuildID[i] = 0;
m_astrGuildName[i] = "";
}
NANOEND
}
void CPythonNetworkStream::__DirectEnterMode_Initialize()

View File

@ -1079,7 +1079,6 @@ bool CPythonNetworkStream::SendMessengerRemovePacket(const char * c_szKey, const
bool CPythonNetworkStream::SendCharacterStatePacket(const TPixelPosition& c_rkPPosDst, float fDstRot, UINT eFunc, UINT uArg)
{
NANOBEGIN
if (!__CanActMainInstance())
return true;
@ -1113,7 +1112,7 @@ bool CPythonNetworkStream::SendCharacterStatePacket(const TPixelPosition& c_rkPP
kStatePacket.bArg);
return false;
}
NANOEND
return SendSequence();
}

View File

@ -205,7 +205,6 @@ int Setup(LPSTR lpCmdLine); // Internal function forward
bool PackInitialize(const std::string& packFolder)
{
NANOBEGIN
if (_access(packFolder.c_str(), 0) != 0)
return true;
@ -278,7 +277,6 @@ bool PackInitialize(const std::string& packFolder)
}
}
NANOEND
return true;
}
@ -319,8 +317,6 @@ bool RunMainScript(CPythonLauncher& pyLauncher, const char* lpCmdLine)
initguild();
initServerStateChecker();
NANOBEGIN
// RegisterDebugFlag
{
std::string stRegisterDebugFlag;
@ -392,7 +388,6 @@ bool RunMainScript(CPythonLauncher& pyLauncher, const char* lpCmdLine)
}
}
NANOEND
return true;
}