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>
49 lines
878 B
C++
49 lines
878 B
C++
#pragma once
|
|
|
|
#include "Patch_Util.h"
|
|
|
|
|
|
DWORD GetFileSize( const char* szFileName )
|
|
{
|
|
HANDLE hFile = CreateFile( szFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
|
NULL, OPEN_EXISTING, 0, 0 );
|
|
if( INVALID_HANDLE_VALUE == hFile )
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
DWORD dwFileSize = GetFileSize ( hFile, NULL );
|
|
CloseHandle( hFile );
|
|
|
|
return dwFileSize;
|
|
}
|
|
|
|
bool IsFileExist( const char* szFileName )
|
|
{
|
|
HANDLE hFile = CreateFile( szFileName, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
|
NULL, OPEN_EXISTING, 0, 0 );
|
|
if( INVALID_HANDLE_VALUE == hFile )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
CloseHandle( hFile );
|
|
return true;
|
|
}
|
|
|
|
bool IsDirectoryExist( const char* szDirName )
|
|
{
|
|
DWORD dwAttr = GetFileAttributes( szDirName );
|
|
|
|
if( INVALID_FILE_ATTRIBUTES == dwAttr )
|
|
{
|
|
return false;
|
|
}
|
|
|
|
if( FILE_ATTRIBUTE_DIRECTORY & dwAttr )
|
|
{
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
} |