Initial commit: ROW Client source code

Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-29 16:24:34 +09:00
commit e067522598
5135 changed files with 1745744 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
# Microsoft Developer Studio Project File - Name="ControlBase" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ControlBase - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ControlBase.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ControlBase.mak" CFG="ControlBase - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ControlBase - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "ControlBase - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ControlBase - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "ControlBase - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "..\..\..\..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG" /d "WIN32"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ENDIF
# Begin Target
# Name "ControlBase - Win32 Release"
# Name "ControlBase - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\controlhelp.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\controlhelp.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,224 @@
//------------------------------------------------------------------------------
// File: ControlHelp.cpp
//
// Desc: DirectShow sample code - implementation of CSliderValue and
// CRadioChoice classes.
//
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include <windows.h>
#include "ControlHelp.h"
#include <commctrl.h>
#include <stdio.h>
#include <tchar.h>
#include <atlbase.h>
//////////////////////////////////////////////////////////////////////////////
// CSliderValue
const short g_sMaxContinuousTicks = 100;
const int g_iMaxCharBuffer = 50; // # characters big enough to hold -FLT_MAX with room to spare
CSliderValue::CSliderValue()
: m_fInit(false)
{
}
void CSliderValue::Init(
HWND hwndSlider,
HWND hwndEdit,
float fMin,
float fMax,
bool fDiscrete)
{
m_hwndSlider = hwndSlider;
m_hwndEdit = hwndEdit;
m_fMin = fMin;
m_fMax = fMax;
m_fDiscrete = fDiscrete;
short sMin;
short sMax;
short sTicks = 4; // Lots of ticks become less useful as guides. Use quarters for fine-grained sliders.
if (m_fDiscrete)
{
sMin = static_cast<short>(fMin);
sMax = static_cast<short>(fMax);
if (sMax - sMin <= 10)
sTicks = (short) (sMax - sMin);
}
else
{
sMin = 0;
sMax = g_sMaxContinuousTicks;
}
SendMessage(m_hwndSlider, TBM_SETRANGE, TRUE, MAKELONG(sMin, sMax));
SendMessage(m_hwndSlider, TBM_SETTICFREQ, (sMax - sMin) / sTicks, 0);
m_fInit = true;
}
void CSliderValue::SetValue(float fPos)
{
if (!m_fInit)
return;
UpdateEditBox(fPos);
UpdateSlider();
}
float CSliderValue::GetValue()
{
if (!m_fInit)
return 0;
LRESULT lrLen = SendMessage(m_hwndEdit, WM_GETTEXTLENGTH, 0, 0);
if (lrLen >= g_iMaxCharBuffer)
return 0;
TCHAR szText[g_iMaxCharBuffer] = TEXT("");
SendMessage(m_hwndEdit, WM_GETTEXT, g_iMaxCharBuffer, reinterpret_cast<LPARAM>(szText));
USES_CONVERSION;
float fVal = static_cast<float>(m_fDiscrete ? _ttoi(szText) : atof(T2A(szText)));
if (fVal < m_fMin) fVal = m_fMin;
if (fVal > m_fMax) fVal = m_fMax;
return fVal;
}
float CSliderValue::GetSliderValue()
{
short sPos = static_cast<short>(SendMessage(m_hwndSlider, TBM_GETPOS, 0, 0));
if (m_fDiscrete)
{
return sPos;
}
float fRet = (m_fMax - m_fMin) * sPos / g_sMaxContinuousTicks + m_fMin;
return fRet;
}
LRESULT CSliderValue::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if (!m_fInit)
return FALSE;
bHandled = FALSE;
switch (uMsg)
{
case WM_HSCROLL:
if (reinterpret_cast<HWND>(lParam) == m_hwndSlider && LOWORD(wParam) >= TB_LINEUP && LOWORD(wParam) <= TB_ENDTRACK)
{
UpdateEditBox(GetSliderValue());
bHandled = TRUE;
}
break;
case WM_COMMAND:
if (HIWORD(wParam) == EN_KILLFOCUS && reinterpret_cast<HWND>(lParam) == m_hwndEdit)
{
UpdateSlider();
bHandled = TRUE;
}
break;
}
return 0;
}
void CSliderValue::UpdateEditBox(float fPos)
{
TCHAR szText[g_iMaxCharBuffer] = TEXT("");
if (m_fDiscrete)
{
short sPos = static_cast<short>(fPos);
wsprintf(szText, TEXT("%hd"), sPos);
}
else
{
wsprintf(szText, TEXT("%.3hf"), fPos);
}
SendMessage(m_hwndEdit, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(szText));
}
void CSliderValue::UpdateSlider()
{
float fVal = GetValue();
short sPos = static_cast<short>(m_fDiscrete ? fVal : g_sMaxContinuousTicks * ((fVal - m_fMin) / (m_fMax - m_fMin)));
SendMessage(m_hwndSlider, TBM_SETPOS, TRUE, sPos);
UpdateEditBox(fVal); // this resets the input box back to the set float value in case the input was invalid
}
//////////////////////////////////////////////////////////////////////////////
// CSliderValue
CRadioChoice::CRadioChoice(const ButtonEntry *pButtonInfo)
: m_pButtonInfo(pButtonInfo)
{
}
void CRadioChoice::SetChoice(HWND hDlg, LONG lValue)
{
for (const ButtonEntry *p = m_pButtonInfo; p->nIDDlgItem; ++p)
{
if (p->lValue == lValue)
{
CheckDlgButton(hDlg, p->nIDDlgItem, BST_CHECKED);
return;
}
}
}
LONG CRadioChoice::GetChoice(HWND hDlg)
{
for (const ButtonEntry *p = m_pButtonInfo; p->nIDDlgItem; ++p)
{
if (BST_CHECKED == IsDlgButtonChecked(hDlg, p->nIDDlgItem))
{
return p->lValue;
}
}
return 0;
}
LRESULT CRadioChoice::MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
bHandled = FALSE;
UNREFERENCED_PARAMETER(lParam);
if (uMsg == WM_COMMAND && HIWORD(wParam) == BN_CLICKED)
{
for (const ButtonEntry *p = m_pButtonInfo; p->nIDDlgItem; ++p)
{
if (p->nIDDlgItem == LOWORD(wParam))
{
bHandled = TRUE;
return 0;
}
}
}
return 0;
}
//////////////////////////////////////////////////////////////////////////////
// MessageHandlerChain
LRESULT MessageHandlerChain(Handler **ppHandlers, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
LRESULT lr = 0;
bHandled = FALSE;
for (Handler **pp = ppHandlers; *pp && !bHandled; ++pp)
{
lr = (*pp)->MessageHandler(uMsg, wParam, lParam, bHandled);
}
return lr;
}

View File

@@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// File: ControlHelp.h
//
// Desc: DirectShow sample code - definitions of CSliderValue and
// CRadioChoice classes.
//
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#pragma once
class Handler
{
public:
virtual LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) = 0;
};
class CSliderValue
: public Handler
{
public:
CSliderValue();
void Init(HWND hwndSlider, HWND hwndEdit, float fMin, float fMax, bool fDiscrete);
void SetValue(float fPos);
float GetValue();
LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
private:
bool m_fInit;
HWND m_hwndSlider;
HWND m_hwndEdit;
float m_fMin;
float m_fMax;
bool m_fDiscrete;
private:
float GetSliderValue();
void UpdateEditBox(float fPos);
void UpdateSlider();
};
class CRadioChoice
: public Handler
{
public:
struct ButtonEntry
{
int nIDDlgItem;
LONG lValue;
};
// Create passing a ButtonEntry array terminated by an entry with nIDDlgItem of 0.
CRadioChoice(const ButtonEntry *pButtonInfo);
void SetChoice(HWND hDlg, LONG lValue);
LONG GetChoice(HWND hDlg);
LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
private:
const ButtonEntry *m_pButtonInfo;
};
// MessageHandlerChain is a helper for implementing the property page message handler.
// It takes a NULL-terminated array of Message pointers (could be CSliderValue or CRadioChoice)
// and calls them in order until one of them sets bHandled.
LRESULT MessageHandlerChain(Handler **ppHandlers, UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);