Compare commits
4 Commits
issue-9-sa
...
claude/lin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfe0baabce | ||
|
|
2fe362e0a9 | ||
| 00c5be4d8a | |||
| d3966d971f |
@@ -20,12 +20,30 @@ set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo,Release
|
|||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
add_compile_definitions("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:__int64=long long>")
|
||||||
|
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mssse3>")
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
|
||||||
|
endif()
|
||||||
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
|
add_compile_definitions("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:__int64=long long>")
|
||||||
|
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mssse3>")
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
|
||||||
add_compile_options(/MP)
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
|
add_compile_definitions("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:__int64=long long>")
|
||||||
|
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mssse3>")
|
||||||
|
if(MSVC)
|
||||||
|
add_compile_options(/MP)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
|
add_compile_definitions("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:__int64=long long>")
|
||||||
|
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-mssse3>")
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_definitions(UNICODE _UNICODE)
|
add_compile_definitions(UNICODE _UNICODE)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
5
extern/include/python/cpython/pydebug.h
vendored
5
extern/include/python/cpython/pydebug.h
vendored
@@ -13,7 +13,12 @@ Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_InspectFlag;
|
|||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoSiteFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoSiteFlag;
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_BytesWarningFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_BytesWarningFlag;
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
PyAPI_FUNC(int*) M2_GetPyFrozenFlagPtr(void);
|
||||||
|
#define Py_FrozenFlag (*M2_GetPyFrozenFlagPtr())
|
||||||
|
#else
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_FrozenFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_FrozenFlag;
|
||||||
|
#endif
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_IgnoreEnvironmentFlag;
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_DontWriteBytecodeFlag;
|
||||||
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoUserSiteDirectory;
|
Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_NoUserSiteDirectory;
|
||||||
|
|||||||
2
extern/include/python/python.h
vendored
Normal file
2
extern/include/python/python.h
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Python.h"
|
||||||
1
extern/include/utf8.h
vendored
1
extern/include/utf8.h
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
#include <cstdint>
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|||||||
6
extern/library/DirectX/CMakeLists.txt
vendored
6
extern/library/DirectX/CMakeLists.txt
vendored
@@ -1,3 +1,7 @@
|
|||||||
add_library(DirectX INTERFACE)
|
add_library(DirectX INTERFACE)
|
||||||
target_include_directories(DirectX INTERFACE "${CMAKE_SOURCE_DIR}/extern/include")
|
target_include_directories(DirectX INTERFACE "${CMAKE_SOURCE_DIR}/extern/include")
|
||||||
target_link_libraries(DirectX INTERFACE "${CMAKE_CURRENT_LIST_DIR}/d3d9.lib" "${CMAKE_CURRENT_LIST_DIR}/d3dx9.lib" "${CMAKE_CURRENT_LIST_DIR}/dinput8.lib" "${CMAKE_CURRENT_LIST_DIR}/dxguid.lib")
|
if(MSVC)
|
||||||
|
target_link_libraries(DirectX INTERFACE "${CMAKE_CURRENT_LIST_DIR}/d3d9.lib" "${CMAKE_CURRENT_LIST_DIR}/d3dx9.lib" "${CMAKE_CURRENT_LIST_DIR}/dinput8.lib" "${CMAKE_CURRENT_LIST_DIR}/dxguid.lib")
|
||||||
|
else()
|
||||||
|
target_link_libraries(DirectX INTERFACE "${CMAKE_CURRENT_LIST_DIR}/d3d9.lib" "${CMAKE_CURRENT_LIST_DIR}/d3dx9.lib" "${CMAKE_CURRENT_LIST_DIR}/dinput8.lib")
|
||||||
|
endif()
|
||||||
|
|||||||
18
extern/library/Python/CMakeLists.txt
vendored
18
extern/library/Python/CMakeLists.txt
vendored
@@ -1,7 +1,15 @@
|
|||||||
add_library(Python INTERFACE)
|
add_library(Python INTERFACE)
|
||||||
target_include_directories(Python INTERFACE "${CMAKE_SOURCE_DIR}/extern/include")
|
target_include_directories(Python INTERFACE "${CMAKE_SOURCE_DIR}/extern/include")
|
||||||
target_link_libraries(Python INTERFACE
|
if(MSVC)
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/python314_static.lib"
|
target_link_libraries(Python INTERFACE
|
||||||
pathcch
|
"${CMAKE_CURRENT_LIST_DIR}/python314_static.lib"
|
||||||
bcrypt
|
pathcch
|
||||||
)
|
bcrypt
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_link_libraries(Python INTERFACE
|
||||||
|
"${CMAKE_CURRENT_LIST_DIR}/libpython314.dll.a"
|
||||||
|
pathcch
|
||||||
|
bcrypt
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(AudioLib STATIC ${FILE_SOURCES})
|
add_library(AudioLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(AudioLib
|
target_link_libraries(AudioLib
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include <cstdint>
|
||||||
#pragma once
|
#pragma once
|
||||||
#define MA_NO_WASAPI
|
#define MA_NO_WASAPI
|
||||||
#define MA_ENABLE_DSOUND
|
#define MA_ENABLE_DSOUND
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include <cstdint>
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(Discord STATIC ${FILE_SOURCES})
|
add_library(Discord STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
# target_link_libraries(Discord
|
# target_link_libraries(Discord
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
# Use tea.cpp from EterBase instead of maintaining a local copy
|
# Use tea.cpp from EterBase instead of maintaining a local copy
|
||||||
list(APPEND FILE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../EterBase/tea.cpp")
|
list(APPEND FILE_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/../EterBase/tea.cpp")
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EffectLib STATIC ${FILE_SOURCES})
|
add_library(EffectLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EffectLib
|
target_link_libraries(EffectLib
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ extern BOOL GetTokenTimeEventFloat(CTextFileLoader & rTextFileLoader, const char
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
void InsertItemTimeEvent(std::vector<CTimeEvent<T> >* pTable, float fTime, T fValue)
|
void InsertItemTimeEvent(std::vector<CTimeEvent<T> >* pTable, float fTime, T fValue)
|
||||||
{
|
{
|
||||||
typedef std::vector<CTimeEvent<T> >::iterator iterator;
|
typedef typename std::vector<CTimeEvent<T> >::iterator iterator;
|
||||||
|
|
||||||
iterator itor = std::lower_bound(pTable->begin(), pTable->end(), fTime);
|
iterator itor = std::lower_bound(pTable->begin(), pTable->end(), fTime);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterBase STATIC ${FILE_SOURCES})
|
add_library(EterBase STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterBase
|
target_link_libraries(EterBase
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ extern void Tracenf(const char* c_szFormat, ...);
|
|||||||
extern void Tracef(const char* c_szFormat, ...);
|
extern void Tracef(const char* c_szFormat, ...);
|
||||||
extern void TraceError(const char* c_szFormat, ...);
|
extern void TraceError(const char* c_szFormat, ...);
|
||||||
extern void TraceErrorWithoutEnter(const char* c_szFormat, ...);
|
extern void TraceErrorWithoutEnter(const char* c_szFormat, ...);
|
||||||
// MR-11: Separate packet dump log from the main log file
|
|
||||||
extern void TempTrace(const char* c_szMsg, bool errType = false);
|
extern void TempTrace(const char* c_szMsg, bool errType = false);
|
||||||
extern void TempTracef(const char* c_szFormat, bool errType = false, ...);
|
extern void TempTracef(const char* c_szFormat, bool errType = false, ...);
|
||||||
extern void TempTracen(const char* c_szMsg, bool errType = false);
|
extern void TempTracen(const char* c_szMsg, bool errType = false);
|
||||||
@@ -27,13 +26,12 @@ extern void TempTracenf(const char* c_szFormat, bool errType = false, ...);
|
|||||||
|
|
||||||
extern void PacketDump(const char* c_szMsg);
|
extern void PacketDump(const char* c_szMsg);
|
||||||
extern void PacketDumpf(const char* c_szFormat, ...);
|
extern void PacketDumpf(const char* c_szFormat, ...);
|
||||||
// MR-11: -- END OF -- Separate packet dump log from the main log file
|
|
||||||
|
|
||||||
extern void LogBox(const char* c_szMsg, const char * c_szCaption = NULL, HWND hWnd = NULL);
|
extern void LogBox(const char* c_szMsg, const char* c_szCaption = NULL, HWND hWnd = NULL);
|
||||||
extern void LogBoxf(const char* c_szMsg, ...);
|
extern void LogBoxf(const char* c_szMsg, ...);
|
||||||
|
|
||||||
extern void LogFile(const char* c_szMsg);
|
extern void LogFile(const char* c_szMsg);
|
||||||
extern void LogFilef(const char * c_szMessage, ...);
|
extern void LogFilef(const char* c_szMessage, ...);
|
||||||
extern void OpenConsoleWindow(void);
|
extern void OpenConsoleWindow(void);
|
||||||
extern void CloseConsoleWindow();
|
extern void CloseConsoleWindow();
|
||||||
extern void SetupLog(void);
|
extern void SetupLog(void);
|
||||||
@@ -43,12 +41,12 @@ extern void CloseLogFile();
|
|||||||
|
|
||||||
extern HWND g_PopupHwnd;
|
extern HWND g_PopupHwnd;
|
||||||
|
|
||||||
#define CHECK_RETURN(flag, string) \
|
#define CHECK_RETURN(flag, string) \
|
||||||
if (flag) \
|
if (flag) \
|
||||||
{ \
|
{ \
|
||||||
LogBox(string); \
|
LogBox(string); \
|
||||||
return; \
|
return; \
|
||||||
} \
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "..\StdAfx.h"
|
#include "../StdAfx.h"
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
template <typename T> class CSingleton
|
template <typename T> class CSingleton
|
||||||
{
|
{
|
||||||
static T * ms_singleton;
|
static T* ms_singleton;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSingleton()
|
CSingleton()
|
||||||
{
|
{
|
||||||
assert(!ms_singleton);
|
assert(!ms_singleton);
|
||||||
intptr_t offset = (intptr_t) (T*) 1 - (intptr_t) (CSingleton <T>*) (T*) 1;
|
intptr_t offset = (intptr_t)(T*)1 - (intptr_t)(CSingleton<T>*)(T*)1;
|
||||||
ms_singleton = (T*) ((intptr_t) this + offset);
|
ms_singleton = (T*)((intptr_t)this + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~CSingleton()
|
virtual ~CSingleton()
|
||||||
@@ -21,39 +21,36 @@ public:
|
|||||||
ms_singleton = 0;
|
ms_singleton = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T & Instance()
|
__forceinline static T& Instance()
|
||||||
{
|
{
|
||||||
assert(ms_singleton);
|
assert(ms_singleton);
|
||||||
return (*ms_singleton);
|
return (*ms_singleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T * InstancePtr()
|
__forceinline static T* InstancePtr()
|
||||||
{
|
{
|
||||||
return (ms_singleton);
|
return (ms_singleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T & instance()
|
__forceinline static T& instance()
|
||||||
{
|
{
|
||||||
assert(ms_singleton);
|
assert(ms_singleton);
|
||||||
return (*ms_singleton);
|
return (*ms_singleton);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T> T * CSingleton <T>::ms_singleton = 0;
|
template <typename T> T* CSingleton<T>::ms_singleton = 0;
|
||||||
|
|
||||||
//
|
|
||||||
// singleton for non-hungarian
|
|
||||||
//
|
|
||||||
template <typename T> class singleton
|
template <typename T> class singleton
|
||||||
{
|
{
|
||||||
static T * ms_singleton;
|
static T* ms_singleton;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
singleton()
|
singleton()
|
||||||
{
|
{
|
||||||
assert(!ms_singleton);
|
assert(!ms_singleton);
|
||||||
intptr_t offset = (intptr_t) (T*) 1 - (intptr_t) (singleton <T>*) (T*) 1;
|
intptr_t offset = (intptr_t)(T*)1 - (intptr_t)(singleton<T>*)(T*)1;
|
||||||
ms_singleton = (T*) ((intptr_t) this + offset);
|
ms_singleton = (T*)((intptr_t)this + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~singleton()
|
virtual ~singleton()
|
||||||
@@ -62,24 +59,24 @@ public:
|
|||||||
ms_singleton = 0;
|
ms_singleton = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T & Instance()
|
__forceinline static T& Instance()
|
||||||
{
|
{
|
||||||
assert(ms_singleton);
|
assert(ms_singleton);
|
||||||
return (*ms_singleton);
|
return (*ms_singleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T * InstancePtr()
|
__forceinline static T* InstancePtr()
|
||||||
{
|
{
|
||||||
return (ms_singleton);
|
return (ms_singleton);
|
||||||
}
|
}
|
||||||
|
|
||||||
__forceinline static T & instance()
|
__forceinline static T& instance()
|
||||||
{
|
{
|
||||||
assert(ms_singleton);
|
assert(ms_singleton);
|
||||||
return (*ms_singleton);
|
return (*ms_singleton);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T> T * singleton <T>::ms_singleton = 0;
|
template <typename T> T* singleton<T>::ms_singleton = 0;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <SSTREAM>
|
#include <sstream>
|
||||||
|
|
||||||
#pragma warning ( pop )
|
#pragma warning ( pop )
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#include <cmath>
|
||||||
#ifndef __INC_ETER2_ETERBASE_UTILS_H__
|
#ifndef __INC_ETER2_ETERBASE_UTILS_H__
|
||||||
#define __INC_ETER2_ETERBASE_UTILS_H__
|
#define __INC_ETER2_ETERBASE_UTILS_H__
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ LONG __stdcall EterExceptionFilter(_EXCEPTION_POINTERS* pExceptionInfo)
|
|||||||
fprintf(fException, "rcx: 0x%016llx\trdx: 0x%016llx\n", context.Rcx, context.Rdx);
|
fprintf(fException, "rcx: 0x%016llx\trdx: 0x%016llx\n", context.Rcx, context.Rdx);
|
||||||
fprintf(fException, "rsi: 0x%016llx\trdi: 0x%016llx\n", context.Rsi, context.Rdi);
|
fprintf(fException, "rsi: 0x%016llx\trdi: 0x%016llx\n", context.Rsi, context.Rdi);
|
||||||
fprintf(fException, "rbp: 0x%016llx\trsp: 0x%016llx\n", context.Rbp, context.Rsp);
|
fprintf(fException, "rbp: 0x%016llx\trsp: 0x%016llx\n", context.Rbp, context.Rsp);
|
||||||
|
fprintf(fException, "rip: 0x%016llx\n", context.Rip);
|
||||||
fprintf(fException, "\n");
|
fprintf(fException, "\n");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterGrnLib STATIC ${FILE_SOURCES})
|
add_library(EterGrnLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterGrnLib
|
target_link_libraries(EterGrnLib
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterImageLib STATIC ${FILE_SOURCES})
|
add_library(EterImageLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterImageLib
|
target_link_libraries(EterImageLib
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterLib STATIC ${FILE_SOURCES})
|
add_library(EterLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterLib
|
target_link_libraries(EterLib
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include "msctf.h"
|
#include "msctf.h"
|
||||||
#include <oleauto.h>
|
#include <oleauto.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <cstdint>
|
||||||
#include <utf8.h>
|
#include <utf8.h>
|
||||||
|
|
||||||
#define COUNTOF(a) ( sizeof( a ) / sizeof( ( a )[0] ) )
|
#define COUNTOF(a) ( sizeof( a ) / sizeof( ( a )[0] ) )
|
||||||
@@ -66,6 +67,12 @@ enum { IMEUI_STATE_OFF, IMEUI_STATE_ON, IMEUI_STATE_ENGLISH };
|
|||||||
|
|
||||||
#define LCID_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)
|
#define LCID_INVARIANT MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)
|
||||||
|
|
||||||
|
#if defined(__MINGW32__) && !defined(__ITfReadingInformationUIElement_INTERFACE_DEFINED__)
|
||||||
|
#define M2_HAS_TSF_UIELEMENT_EXT 0
|
||||||
|
#else
|
||||||
|
#define M2_HAS_TSF_UIELEMENT_EXT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
wchar_t s_aszIndicator[5][3] =
|
wchar_t s_aszIndicator[5][3] =
|
||||||
{
|
{
|
||||||
L"En",
|
L"En",
|
||||||
@@ -179,8 +186,10 @@ protected:
|
|||||||
LONG _cRef;
|
LONG _cRef;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if M2_HAS_TSF_UIELEMENT_EXT
|
||||||
static void MakeReadingInformationString(ITfReadingInformationUIElement* preading);
|
static void MakeReadingInformationString(ITfReadingInformationUIElement* preading);
|
||||||
static void MakeCandidateStrings(ITfCandidateListUIElement* pcandidate);
|
static void MakeCandidateStrings(ITfCandidateListUIElement* pcandidate);
|
||||||
|
#endif
|
||||||
static ITfUIElement* GetUIElement(DWORD dwUIElementId);
|
static ITfUIElement* GetUIElement(DWORD dwUIElementId);
|
||||||
static BOOL GetCompartments( ITfCompartmentMgr** ppcm, ITfCompartment** ppTfOpenMode, ITfCompartment** ppTfConvMode );
|
static BOOL GetCompartments( ITfCompartmentMgr** ppcm, ITfCompartment** ppTfOpenMode, ITfCompartment** ppTfConvMode );
|
||||||
static BOOL SetupCompartmentSinks( BOOL bResetOnly = FALSE, ITfCompartment* pTfOpenMode = NULL, ITfCompartment* ppTfConvMode = NULL );
|
static BOOL SetupCompartmentSinks( BOOL bResetOnly = FALSE, ITfCompartment* pTfOpenMode = NULL, ITfCompartment* ppTfConvMode = NULL );
|
||||||
@@ -1475,7 +1484,7 @@ DWORD CIME::GetImeId( UINT uIndex )
|
|||||||
return ms_adwId[uIndex];
|
return ms_adwId[uIndex];
|
||||||
hklPrev = hkl;
|
hklPrev = hkl;
|
||||||
|
|
||||||
DWORD dwLang = ((DWORD)hkl & 0xffff);
|
DWORD dwLang = (static_cast<DWORD>(reinterpret_cast<ULONG_PTR>(hkl)) & 0xffff);
|
||||||
|
|
||||||
if ( ms_bUILessMode && GETLANG() == LANG_CHT ) {
|
if ( ms_bUILessMode && GETLANG() == LANG_CHT ) {
|
||||||
// In case of Vista, artifitial value is returned so that it's not considered as older IME.
|
// In case of Vista, artifitial value is returned so that it's not considered as older IME.
|
||||||
@@ -1734,7 +1743,7 @@ void CIME::CheckToggleState()
|
|||||||
|
|
||||||
/* Check Toggle State */
|
/* Check Toggle State */
|
||||||
bool bIme = ImmIsIME( ms_hklCurrent ) != 0
|
bool bIme = ImmIsIME( ms_hklCurrent ) != 0
|
||||||
&& ( ( 0xF0000000 & (DWORD)ms_hklCurrent ) == 0xE0000000 ); // Hack to detect IME correctly. When IME is running as TIP, ImmIsIME() returns true for CHT US keyboard.
|
&& ((0xF0000000u & static_cast<DWORD>(reinterpret_cast<ULONG_PTR>(ms_hklCurrent))) == 0xE0000000u); // Hack to detect IME correctly. When IME is running as TIP, ImmIsIME() returns true for CHT US keyboard.
|
||||||
ms_bChineseIME = ( GETPRIMLANG() == LANG_CHINESE ) && bIme;
|
ms_bChineseIME = ( GETPRIMLANG() == LANG_CHINESE ) && bIme;
|
||||||
|
|
||||||
HIMC himc;
|
HIMC himc;
|
||||||
@@ -1897,6 +1906,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::BeginUIElement(DWORD dwUIElementId, BOOL
|
|||||||
if (!pElement)
|
if (!pElement)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
#if M2_HAS_TSF_UIELEMENT_EXT
|
||||||
ITfReadingInformationUIElement *preading = NULL;
|
ITfReadingInformationUIElement *preading = NULL;
|
||||||
ITfCandidateListUIElement *pcandidate = NULL;
|
ITfCandidateListUIElement *pcandidate = NULL;
|
||||||
*pbShow = FALSE;
|
*pbShow = FALSE;
|
||||||
@@ -1922,6 +1932,9 @@ STDAPI CTsfUiLessMode::CUIElementSink::BeginUIElement(DWORD dwUIElementId, BOOL
|
|||||||
CIME::ms_pEvent->OnOpenCandidateList();
|
CIME::ms_pEvent->OnOpenCandidateList();
|
||||||
pcandidate->Release();
|
pcandidate->Release();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
*pbShow = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
pElement->Release();
|
pElement->Release();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -1933,6 +1946,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::UpdateUIElement(DWORD dwUIElementId)
|
|||||||
if (!pElement)
|
if (!pElement)
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
|
|
||||||
|
#if M2_HAS_TSF_UIELEMENT_EXT
|
||||||
ITfReadingInformationUIElement *preading = NULL;
|
ITfReadingInformationUIElement *preading = NULL;
|
||||||
ITfCandidateListUIElement *pcandidate = NULL;
|
ITfCandidateListUIElement *pcandidate = NULL;
|
||||||
|
|
||||||
@@ -1956,6 +1970,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::UpdateUIElement(DWORD dwUIElementId)
|
|||||||
CIME::ms_pEvent->OnOpenCandidateList();
|
CIME::ms_pEvent->OnOpenCandidateList();
|
||||||
pcandidate->Release();
|
pcandidate->Release();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pElement->Release();
|
pElement->Release();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -1973,6 +1988,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::EndUIElement(DWORD dwUIElementId)
|
|||||||
//OutputDebugStringW(bstrDesc);
|
//OutputDebugStringW(bstrDesc);
|
||||||
//OutputDebugStringW(L"\n");
|
//OutputDebugStringW(L"\n");
|
||||||
|
|
||||||
|
#if M2_HAS_TSF_UIELEMENT_EXT
|
||||||
ITfReadingInformationUIElement *preading = NULL;
|
ITfReadingInformationUIElement *preading = NULL;
|
||||||
if (SUCCEEDED(pElement->QueryInterface(__uuidof(ITfReadingInformationUIElement), (void **)&preading)))
|
if (SUCCEEDED(pElement->QueryInterface(__uuidof(ITfReadingInformationUIElement), (void **)&preading)))
|
||||||
{
|
{
|
||||||
@@ -1988,6 +2004,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::EndUIElement(DWORD dwUIElementId)
|
|||||||
CIME::CloseCandidateList();
|
CIME::CloseCandidateList();
|
||||||
pcandidate->Release();
|
pcandidate->Release();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
pElement->Release();
|
pElement->Release();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
@@ -1995,6 +2012,11 @@ STDAPI CTsfUiLessMode::CUIElementSink::EndUIElement(DWORD dwUIElementId)
|
|||||||
|
|
||||||
void CTsfUiLessMode::UpdateImeState(BOOL bResetCompartmentEventSink)
|
void CTsfUiLessMode::UpdateImeState(BOOL bResetCompartmentEventSink)
|
||||||
{
|
{
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
(void)bResetCompartmentEventSink;
|
||||||
|
CIME::ms_dwImeState = CIME::ms_bChineseIME ? IMEUI_STATE_ENGLISH : IMEUI_STATE_OFF;
|
||||||
|
return;
|
||||||
|
#else
|
||||||
ITfCompartmentMgr* pcm;
|
ITfCompartmentMgr* pcm;
|
||||||
ITfCompartment* pTfOpenMode = NULL;
|
ITfCompartment* pTfOpenMode = NULL;
|
||||||
ITfCompartment* pTfConvMode = NULL;
|
ITfCompartment* pTfConvMode = NULL;
|
||||||
@@ -2026,6 +2048,7 @@ void CTsfUiLessMode::UpdateImeState(BOOL bResetCompartmentEventSink)
|
|||||||
pTfConvMode->Release();
|
pTfConvMode->Release();
|
||||||
pcm->Release();
|
pcm->Release();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
STDAPI CTsfUiLessMode::CUIElementSink::OnActivated(DWORD dwProfileType, LANGID langid, REFCLSID clsid, REFGUID catid,
|
STDAPI CTsfUiLessMode::CUIElementSink::OnActivated(DWORD dwProfileType, LANGID langid, REFCLSID clsid, REFGUID catid,
|
||||||
@@ -2053,6 +2076,7 @@ STDAPI CTsfUiLessMode::CUIElementSink::OnChange(REFGUID rguid)
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if M2_HAS_TSF_UIELEMENT_EXT
|
||||||
void CTsfUiLessMode::MakeReadingInformationString(ITfReadingInformationUIElement* preading)
|
void CTsfUiLessMode::MakeReadingInformationString(ITfReadingInformationUIElement* preading)
|
||||||
{
|
{
|
||||||
UINT cchMax;
|
UINT cchMax;
|
||||||
@@ -2164,6 +2188,7 @@ void CTsfUiLessMode::MakeCandidateStrings(ITfCandidateListUIElement* pcandidate)
|
|||||||
free(IndexList);
|
free(IndexList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ITfUIElement* CTsfUiLessMode::GetUIElement(DWORD dwUIElementId)
|
ITfUIElement* CTsfUiLessMode::GetUIElement(DWORD dwUIElementId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterLocale STATIC ${FILE_SOURCES})
|
add_library(EterLocale STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterLocale
|
target_link_libraries(EterLocale
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(EterPythonLib STATIC ${FILE_SOURCES})
|
add_library(EterPythonLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(EterPythonLib
|
target_link_libraries(EterPythonLib
|
||||||
|
|||||||
@@ -55,10 +55,12 @@ void CGridSlotWindow::OnRenderPickingSlot()
|
|||||||
for (std::list<TSlot*>::iterator itor = SlotList.begin(); itor != SlotList.end(); ++itor)
|
for (std::list<TSlot*>::iterator itor = SlotList.begin(); itor != SlotList.end(); ++itor)
|
||||||
{
|
{
|
||||||
TSlot * pSlot = *itor;
|
TSlot * pSlot = *itor;
|
||||||
|
const LONG slotRight = m_rect.left + pSlot->ixPosition + static_cast<LONG>(pSlot->byxPlacedItemSize) * ITEM_WIDTH;
|
||||||
|
const LONG slotBottom = m_rect.top + pSlot->iyPosition + static_cast<LONG>(pSlot->byxPlacedItemSize) * ITEM_HEIGHT;
|
||||||
Rect.left = std::min(Rect.left, m_rect.left + pSlot->ixPosition);
|
Rect.left = std::min(Rect.left, m_rect.left + pSlot->ixPosition);
|
||||||
Rect.top = std::min(Rect.top, m_rect.top + pSlot->iyPosition);
|
Rect.top = std::min(Rect.top, m_rect.top + pSlot->iyPosition);
|
||||||
Rect.right = std::max(Rect.right, m_rect.left + pSlot->ixPosition + pSlot->byxPlacedItemSize*ITEM_WIDTH);
|
Rect.right = std::max(Rect.right, slotRight);
|
||||||
Rect.bottom = std::max(Rect.bottom, m_rect.top + pSlot->iyPosition + pSlot->byxPlacedItemSize*ITEM_HEIGHT);
|
Rect.bottom = std::max(Rect.bottom, slotBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPythonGraphic::Instance().RenderBar2d(Rect.left, Rect.top, Rect.right, Rect.bottom);
|
CPythonGraphic::Instance().RenderBar2d(Rect.left, Rect.top, Rect.right, Rect.bottom);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(GameLib STATIC ${FILE_SOURCES})
|
add_library(GameLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(GameLib
|
target_link_libraries(GameLib
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
class CFlyTarget;
|
||||||
|
|
||||||
class IFlyTargetableObject
|
class IFlyTargetableObject
|
||||||
{
|
{
|
||||||
@@ -77,4 +78,3 @@ inline void IFlyTargetableObject::ClearFlyTargeter()
|
|||||||
}
|
}
|
||||||
m_FlyTargeterSet.clear();
|
m_FlyTargeterSet.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class CMapBase : public CScreen
|
|||||||
virtual float GetHeight(float fx, float fy) = 0;
|
virtual float GetHeight(float fx, float fy) = 0;
|
||||||
virtual void OnBeginEnvironment() = 0; // 렌더링 할 때 불려지며 여기서 Environment에 관련 있는 것들을 셋팅 한다.
|
virtual void OnBeginEnvironment() = 0; // 렌더링 할 때 불려지며 여기서 Environment에 관련 있는 것들을 셋팅 한다.
|
||||||
|
|
||||||
virtual void ApplyLight(DWORD dwVersion, const D3DLIGHT9& c_rkLight) = 0;
|
virtual void ApplyLight(ULONG_PTR dwVersion, const D3DLIGHT9& c_rkLight) = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnRender() = 0;
|
virtual void OnRender() = 0;
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ void CMapManager::BeginEnvironment()
|
|||||||
{
|
{
|
||||||
ms_lpd3dDevice->LightEnable(0, TRUE);
|
ms_lpd3dDevice->LightEnable(0, TRUE);
|
||||||
|
|
||||||
rkMap.ApplyLight((DWORD)mc_pcurEnvironmentData, mc_pcurEnvironmentData->DirLights[ENV_DIRLIGHT_BACKGROUND]);
|
rkMap.ApplyLight(reinterpret_cast<ULONG_PTR>(mc_pcurEnvironmentData), mc_pcurEnvironmentData->DirLights[ENV_DIRLIGHT_BACKGROUND]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ms_lpd3dDevice->LightEnable(0, FALSE);
|
ms_lpd3dDevice->LightEnable(0, FALSE);
|
||||||
@@ -658,4 +658,3 @@ void CMapManager::__LoadMapInfoVector()
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class CMapOutdoor : public CMapBase
|
|||||||
|
|
||||||
bool LoadSetting(const char * c_szFileName);
|
bool LoadSetting(const char * c_szFileName);
|
||||||
|
|
||||||
void ApplyLight(DWORD dwVersion, const D3DLIGHT9& c_rkLight);
|
void ApplyLight(ULONG_PTR dwVersion, const D3DLIGHT9& c_rkLight);
|
||||||
void SetEnvironmentScreenFilter();
|
void SetEnvironmentScreenFilter();
|
||||||
void SetEnvironmentSkyBox();
|
void SetEnvironmentSkyBox();
|
||||||
void SetEnvironmentLensFlare();
|
void SetEnvironmentLensFlare();
|
||||||
@@ -577,7 +577,7 @@ class CMapOutdoor : public CMapBase
|
|||||||
IDirect3DVertexBuffer9* m_pkVBNone[NONE_VB_NUM];
|
IDirect3DVertexBuffer9* m_pkVBNone[NONE_VB_NUM];
|
||||||
DWORD m_dwSplatPos;
|
DWORD m_dwSplatPos;
|
||||||
DWORD m_dwNonePos;
|
DWORD m_dwNonePos;
|
||||||
DWORD m_dwLightVersion;
|
ULONG_PTR m_dwLightVersion;
|
||||||
} m_kSTPD;
|
} m_kSTPD;
|
||||||
|
|
||||||
struct SoftwareTransformPatch_SRenderState {
|
struct SoftwareTransformPatch_SRenderState {
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ void CMapOutdoor::__RenderTerrain_AppendPatch(const D3DXVECTOR3& c_rv3Center, fl
|
|||||||
m_PatchVector.push_back(std::make_pair(fDistance, lPatchNum));
|
m_PatchVector.push_back(std::make_pair(fDistance, lPatchNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMapOutdoor::ApplyLight(DWORD dwVersion, const D3DLIGHT9& c_rkLight)
|
void CMapOutdoor::ApplyLight(ULONG_PTR dwVersion, const D3DLIGHT9& c_rkLight)
|
||||||
{
|
{
|
||||||
m_kSTPD.m_dwLightVersion=dwVersion;
|
m_kSTPD.m_dwLightVersion=dwVersion;
|
||||||
STATEMANAGER.SetLight(0, &c_rkLight);
|
STATEMANAGER.SetLight(0, &c_rkLight);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(PRTerrainLib STATIC ${FILE_SOURCES})
|
add_library(PRTerrainLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(PRTerrainLib
|
target_link_libraries(PRTerrainLib
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES CONFIGURE_DEPENDS "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES CONFIGURE_DEPENDS "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(PackLib STATIC ${FILE_SOURCES})
|
add_library(PackLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(PackLib
|
target_link_libraries(PackLib
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ bool CPackManager::GetFileWithPool(std::string_view path, TPackFile& result, CBu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
RecordPackProfileLoad(
|
RecordPackProfileLoad(
|
||||||
"disk",
|
"disk",
|
||||||
"<disk>",
|
"<disk>",
|
||||||
@@ -212,6 +213,10 @@ void CPackManager::NormalizePath(std::string_view in, std::string& out) const
|
|||||||
if (in[i] == '\\')
|
if (in[i] == '\\')
|
||||||
out[i] = '/';
|
out[i] = '/';
|
||||||
else
|
else
|
||||||
out[i] = static_cast<char>(std::tolower(in[i]));
|
out[i] = static_cast<char>(std::tolower(static_cast<unsigned char>(in[i])));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static constexpr std::string_view kDrivePrefix = "d:/";
|
||||||
|
if (out.rfind(kDrivePrefix, 0) == 0)
|
||||||
|
out.erase(0, kDrivePrefix.size());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_executable(PackMaker ${FILE_SOURCES})
|
add_executable(PackMaker ${FILE_SOURCES})
|
||||||
set_target_properties(PackMaker PROPERTIES
|
set_target_properties(PackMaker PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES CONFIGURE_DEPENDS "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES CONFIGURE_DEPENDS "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(PythonModules STATIC ${FILE_SOURCES})
|
add_library(PythonModules STATIC ${FILE_SOURCES})
|
||||||
GroupSourcesByFolder(PythonModules)
|
GroupSourcesByFolder(PythonModules)
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
/* Auto-generated by Tools/freeze/generate_legacy_frozen.py */
|
/* Auto-generated by Tools/freeze/generate_legacy_frozen.py */
|
||||||
#include <python/Python.h>
|
#include <python/Python.h>
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern unsigned char M___future__[];
|
extern unsigned char M___future__[];
|
||||||
extern unsigned char M___main__[];
|
extern unsigned char M___main__[];
|
||||||
extern unsigned char M__collections_abc[];
|
extern unsigned char M__collections_abc[];
|
||||||
@@ -673,5 +677,15 @@ const struct _frozen _PyImport_FrozenModules[] = {
|
|||||||
|
|
||||||
void InitStandardPythonModules()
|
void InitStandardPythonModules()
|
||||||
{
|
{
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
HMODULE python = GetModuleHandleA("python314.dll");
|
||||||
|
if (python) {
|
||||||
|
const struct _frozen **frozen_modules = (const struct _frozen **)GetProcAddress(python, "PyImport_FrozenModules");
|
||||||
|
if (frozen_modules) {
|
||||||
|
*frozen_modules = _PyImport_FrozenModules;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
PyImport_FrozenModules = _PyImport_FrozenModules;
|
PyImport_FrozenModules = _PyImport_FrozenModules;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES CONFIGURE_DEPENDS "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(ScriptLib STATIC ${FILE_SOURCES})
|
add_library(ScriptLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
|
|||||||
36
src/ScriptLib/PyFrozenFlagShim.cpp
Normal file
36
src/ScriptLib/PyFrozenFlagShim.cpp
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
#include <windows.h>
|
||||||
|
#include <python/Python.h>
|
||||||
|
|
||||||
|
extern "C" int* M2_GetPyFrozenFlagPtr(void)
|
||||||
|
{
|
||||||
|
static int fallback_flag = 0;
|
||||||
|
|
||||||
|
HMODULE python = GetModuleHandleA("python314.dll");
|
||||||
|
if (!python) {
|
||||||
|
return &fallback_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
FARPROC proc = GetProcAddress(python, "Py_FrozenFlag");
|
||||||
|
if (!proc) {
|
||||||
|
return &fallback_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return reinterpret_cast<int*>(proc);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" PyObject* M2_GetPyNonePtr(void)
|
||||||
|
{
|
||||||
|
static PyObject* fallback_none = nullptr;
|
||||||
|
|
||||||
|
HMODULE python = GetModuleHandleA("python314.dll");
|
||||||
|
if (!python) {
|
||||||
|
return fallback_none;
|
||||||
|
}
|
||||||
|
|
||||||
|
FARPROC proc = GetProcAddress(python, "_Py_NoneStruct");
|
||||||
|
if (!proc) {
|
||||||
|
return fallback_none;
|
||||||
|
}
|
||||||
|
|
||||||
|
return reinterpret_cast<PyObject*>(proc);
|
||||||
|
}
|
||||||
@@ -10,6 +10,8 @@ bool __PyCallClassMemberFunc_ByCString(PyObject* poClass, const char* c_szFunc,
|
|||||||
bool __PyCallClassMemberFunc_ByPyString(PyObject* poClass, PyObject* poFuncName, PyObject* poArgs, PyObject** poRet);
|
bool __PyCallClassMemberFunc_ByPyString(PyObject* poClass, PyObject* poFuncName, PyObject* poArgs, PyObject** poRet);
|
||||||
bool __PyCallClassMemberFunc(PyObject* poClass, PyObject* poFunc, PyObject* poArgs, PyObject** poRet);
|
bool __PyCallClassMemberFunc(PyObject* poClass, PyObject* poFunc, PyObject* poArgs, PyObject** poRet);
|
||||||
|
|
||||||
|
extern "C" PyObject* M2_GetPyNonePtr(void);
|
||||||
|
|
||||||
PyObject * Py_BadArgument()
|
PyObject * Py_BadArgument()
|
||||||
{
|
{
|
||||||
PyErr_BadArgument();
|
PyErr_BadArgument();
|
||||||
@@ -36,13 +38,14 @@ PyObject * Py_BuildException(const char * c_pszErr, ...)
|
|||||||
|
|
||||||
PyObject * Py_BuildNone()
|
PyObject * Py_BuildNone()
|
||||||
{
|
{
|
||||||
Py_INCREF(Py_None);
|
PyObject* pyNone = M2_GetPyNonePtr();
|
||||||
return Py_None;
|
Py_INCREF(pyNone);
|
||||||
|
return pyNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Py_ReleaseNone()
|
void Py_ReleaseNone()
|
||||||
{
|
{
|
||||||
Py_DECREF(Py_None);
|
Py_DECREF(M2_GetPyNonePtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PyTuple_GetObject(PyObject* poArgs, int pos, PyObject** ret)
|
bool PyTuple_GetObject(PyObject* poArgs, int pos, PyObject** ret)
|
||||||
@@ -111,7 +114,7 @@ bool PyTuple_GetFloat(PyObject* poArgs, int pos, float* ret)
|
|||||||
if (!poItem)
|
if (!poItem)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
*ret = float(PyFloat_AsDouble(poItem));
|
*ret = static_cast<float>(PyFloat_AsDouble(poItem));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,7 +122,7 @@ bool PyTuple_GetByte(PyObject* poArgs, int pos, unsigned char* ret)
|
|||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
||||||
*ret = unsigned char(val);
|
*ret = static_cast<unsigned char>(val);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +130,7 @@ bool PyTuple_GetInteger(PyObject* poArgs, int pos, unsigned char* ret)
|
|||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
||||||
*ret = unsigned char(val);
|
*ret = static_cast<unsigned char>(val);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -135,7 +138,7 @@ bool PyTuple_GetInteger(PyObject* poArgs, int pos, WORD* ret)
|
|||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
bool result = PyTuple_GetInteger(poArgs,pos,&val);
|
||||||
*ret = WORD(val);
|
*ret = static_cast<WORD>(val);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,23 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SpeedTreeStubs.cpp"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SpeedTreeForest.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SpeedTreeForestDirectX.cpp"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/SpeedTreeWrapper.cpp"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_library(SpeedTreeLib STATIC ${FILE_SOURCES})
|
add_library(SpeedTreeLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
target_link_libraries(SpeedTreeLib
|
target_link_libraries(SpeedTreeLib
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
add_library(SphereLib STATIC ${FILE_SOURCES})
|
add_library(SphereLib STATIC ${FILE_SOURCES})
|
||||||
|
|
||||||
# target_link_libraries(SphereLib
|
# target_link_libraries(SphereLib
|
||||||
|
|||||||
@@ -1,13 +1,29 @@
|
|||||||
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
file(GLOB_RECURSE FILE_SOURCES "*.h" "*.c" "*.cpp")
|
||||||
|
|
||||||
|
foreach(_source IN LISTS FILE_SOURCES)
|
||||||
|
if(IS_SYMLINK "${_source}")
|
||||||
|
list(REMOVE_ITEM FILE_SOURCES "${_source}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
list(APPEND FILE_SOURCES "${CMAKE_SOURCE_DIR}/src/UserInterface/GUIDKeyCompat.cpp")
|
||||||
|
|
||||||
add_executable(UserInterface WIN32 ${FILE_SOURCES} ${CMAKE_SOURCE_DIR}/src/UserInterface/UserInterface.rc)
|
add_executable(UserInterface WIN32 ${FILE_SOURCES} ${CMAKE_SOURCE_DIR}/src/UserInterface/UserInterface.rc)
|
||||||
set_target_properties(UserInterface PROPERTIES LINK_FLAGS "/level='requireAdministrator' /uiAccess='false'"
|
set_target_properties(UserInterface PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
OUTPUT_NAME_DEBUG "Metin2_Debug"
|
OUTPUT_NAME_DEBUG "Metin2_Debug"
|
||||||
OUTPUT_NAME_RELEASE "Metin2_Release"
|
OUTPUT_NAME_RELEASE "Metin2_Release"
|
||||||
OUTPUT_NAME_RELWITHDEBINFO "Metin2_RelWithDebInfo"
|
OUTPUT_NAME_RELWITHDEBINFO "Metin2_RelWithDebInfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set_target_properties(UserInterface PROPERTIES LINK_FLAGS "/level='requireAdministrator' /uiAccess='false'")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(UserInterface PRIVATE
|
||||||
|
$<$<COMPILE_LANGUAGE:RC>:${CMAKE_SOURCE_DIR}/src/UserInterface>
|
||||||
|
)
|
||||||
|
|
||||||
target_link_libraries(UserInterface
|
target_link_libraries(UserInterface
|
||||||
AudioLib
|
AudioLib
|
||||||
Discord
|
Discord
|
||||||
@@ -25,6 +41,7 @@ target_link_libraries(UserInterface
|
|||||||
SpeedTreeLib
|
SpeedTreeLib
|
||||||
SphereLib
|
SphereLib
|
||||||
PackLib
|
PackLib
|
||||||
|
EterLib
|
||||||
|
|
||||||
lzo2
|
lzo2
|
||||||
libzstd_static
|
libzstd_static
|
||||||
@@ -32,17 +49,23 @@ target_link_libraries(UserInterface
|
|||||||
|
|
||||||
DirectX
|
DirectX
|
||||||
Granny
|
Granny
|
||||||
SpeedTree
|
$<$<CXX_COMPILER_ID:MSVC>:SpeedTree>
|
||||||
Python
|
Python
|
||||||
WebView
|
WebView
|
||||||
|
|
||||||
ws2_32
|
ws2_32
|
||||||
|
imm32
|
||||||
|
winmm
|
||||||
strmiids
|
strmiids
|
||||||
amstrmid
|
amstrmid
|
||||||
dmoguids
|
dmoguids
|
||||||
ddraw
|
|
||||||
version
|
version
|
||||||
Dbghelp
|
$<$<CXX_COMPILER_ID:MSVC>:Dbghelp>
|
||||||
|
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:dbghelp>
|
||||||
|
EterImageLib
|
||||||
|
AudioLib
|
||||||
|
PythonModules
|
||||||
|
EterBase
|
||||||
)
|
)
|
||||||
|
|
||||||
GroupSourcesByFolder(UserInterface)
|
GroupSourcesByFolder(UserInterface)
|
||||||
@@ -6,11 +6,11 @@
|
|||||||
#include <stb_image_write.h>
|
#include <stb_image_write.h>
|
||||||
|
|
||||||
#if !defined(_MSC_VER)
|
#if !defined(_MSC_VER)
|
||||||
#include <IL/il.h>
|
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#include "lzo_manager.h"
|
#include "EterBase/CRC32.h"
|
||||||
#include "minilzo.h"
|
#define sys_err TraceError
|
||||||
#define CLZO LZOManager
|
#define sys_log Tracenf
|
||||||
|
#define thecore_memcpy memcpy
|
||||||
#else
|
#else
|
||||||
#define sys_err TraceError
|
#define sys_err TraceError
|
||||||
#define sys_log //(n, format, ...) Tracenf(format, __VA_ARGS__)
|
#define sys_log //(n, format, ...) Tracenf(format, __VA_ARGS__)
|
||||||
|
|||||||
@@ -2,11 +2,15 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "MarkManager.h"
|
#include "MarkManager.h"
|
||||||
|
|
||||||
#if _MSC_VER < 1200
|
#if defined(_MSC_VER) && _MSC_VER < 1200
|
||||||
#include "crc32.h"
|
#include "crc32.h"
|
||||||
#else
|
#else
|
||||||
#define sys_err TraceError
|
#define sys_err TraceError
|
||||||
|
#if defined(_MSC_VER)
|
||||||
#define sys_log // (n, format, ...) Tracenf(format, __VA_ARGS__)
|
#define sys_log // (n, format, ...) Tracenf(format, __VA_ARGS__)
|
||||||
|
#else
|
||||||
|
#define sys_log Tracenf
|
||||||
|
#endif
|
||||||
#define thecore_memcpy memcpy
|
#define thecore_memcpy memcpy
|
||||||
#define itertype(cont) typeof((cont).begin())
|
#define itertype(cont) typeof((cont).begin())
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2,6 +2,29 @@
|
|||||||
#include "MovieMan.h"
|
#include "MovieMan.h"
|
||||||
#include "PythonApplication.h"
|
#include "PythonApplication.h"
|
||||||
|
|
||||||
|
#if !defined(_MSC_VER)
|
||||||
|
|
||||||
|
void CMovieMan::ClearToBlack()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMovieMan::PlayLogo(const char *pcszName)
|
||||||
|
{
|
||||||
|
(void)pcszName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMovieMan::PlayIntro()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CMovieMan::PlayTutorial(LONG nIdx)
|
||||||
|
{
|
||||||
|
(void)nIdx;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
// 2007-08-19, nuclei
|
// 2007-08-19, nuclei
|
||||||
// add following files to the [Project Settings-Linker-Input]
|
// add following files to the [Project Settings-Linker-Input]
|
||||||
// DEBUG: ../dshow/strmbasd.lib ../dshow/dmoguids.lib ddraw.lib
|
// DEBUG: ../dshow/strmbasd.lib ../dshow/dmoguids.lib ddraw.lib
|
||||||
@@ -688,3 +711,5 @@ HRESULT CMovieMan::BuildFilterGraphManually(
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -728,7 +728,10 @@ bool CPythonApplication::Process()
|
|||||||
m_dwFaceAccCount += dwCurFaceCount;
|
m_dwFaceAccCount += dwCurFaceCount;
|
||||||
m_dwFaceAccTime += m_dwCurRenderTime;
|
m_dwFaceAccTime += m_dwCurRenderTime;
|
||||||
|
|
||||||
m_fFaceSpd=(m_dwFaceAccCount/m_dwFaceAccTime);
|
if (m_dwFaceAccTime != 0)
|
||||||
|
m_fFaceSpd = static_cast<float>(m_dwFaceAccCount) / static_cast<float>(m_dwFaceAccTime);
|
||||||
|
else
|
||||||
|
m_fFaceSpd = 0.0f;
|
||||||
|
|
||||||
// °Å¸® ÀÚµ¿ Á¶Àý
|
// °Å¸® ÀÚµ¿ Á¶Àý
|
||||||
if (-1 == m_iForceSightRange)
|
if (-1 == m_iForceSightRange)
|
||||||
|
|||||||
@@ -1,6 +1,24 @@
|
|||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
#include "PythonApplication.h"
|
#include "PythonApplication.h"
|
||||||
|
|
||||||
|
#ifndef IID_ISampleGrabber
|
||||||
|
DEFINE_GUID(IID_ISampleGrabber, 0x6b652fff, 0x11fe, 0x4fce, 0x92, 0xad, 0x02, 0x66, 0xb5, 0xd7, 0xc7, 0x8f);
|
||||||
|
DEFINE_GUID(CLSID_SampleGrabber, 0xc1f400a0, 0x3f08, 0x11d3, 0x9f, 0x0b, 0x00, 0x60, 0x08, 0x03, 0x9e, 0x37);
|
||||||
|
|
||||||
|
MIDL_INTERFACE("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")
|
||||||
|
ISampleGrabber : public IUnknown
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetOneShot(WINBOOL OneShot) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetMediaType(const AM_MEDIA_TYPE* pType) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType(AM_MEDIA_TYPE* pType) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetBufferSamples(WINBOOL BufferThem) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer(LONG* pBufferSize, LONG* pBuffer) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE GetCurrentSample(IMediaSample** ppSample) = 0;
|
||||||
|
virtual HRESULT STDMETHODCALLTYPE SetCallback(IUnknown* pCallback, LONG WhichMethodToCallback) = 0;
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
static bool bInitializedLogo = false;
|
static bool bInitializedLogo = false;
|
||||||
|
|
||||||
int CPythonApplication::OnLogoOpen(char* szName)
|
int CPythonApplication::OnLogoOpen(char* szName)
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "StdAfx.h"
|
#include "StdAfx.h"
|
||||||
#include "PythonApplication.h"
|
#include "PythonApplication.h"
|
||||||
|
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
#undef C8
|
#undef C8
|
||||||
#include <wrl.h>
|
#include <wrl.h>
|
||||||
#include <wil/com.h>
|
#include <wil/com.h>
|
||||||
@@ -118,3 +120,29 @@ void CPythonApplication::HideWebPage()
|
|||||||
else
|
else
|
||||||
SetCursorMode(CURSOR_MODE_HARDWARE);
|
SetCursorMode(CURSOR_MODE_HARDWARE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
bool CPythonApplication::IsWebPageMode()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPythonApplication::ShowWebPage(const char* c_szURL, const RECT& c_rcWebPage)
|
||||||
|
{
|
||||||
|
TraceError("WebView2 is not available in this build");
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPythonApplication::MoveWebPage(const RECT& c_rcWebPage)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPythonApplication::HideWebPage()
|
||||||
|
{
|
||||||
|
if (m_pySystem.IsSoftwareCursor())
|
||||||
|
SetCursorMode(CURSOR_MODE_SOFTWARE);
|
||||||
|
else
|
||||||
|
SetCursorMode(CURSOR_MODE_HARDWARE);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ void CPythonNetworkStream::__ConvertEmpireText(DWORD dwEmpireID, char* szText)
|
|||||||
{
|
{
|
||||||
if (pbText[0]>=0xb0 && pbText[0]<=0xc8 && pbText[1]>=0xa1 && pbText[1]<=0xfe)
|
if (pbText[0]>=0xb0 && pbText[0]<=0xc8 && pbText[1]>=0xa1 && pbText[1]<=0xfe)
|
||||||
{
|
{
|
||||||
uHanPos=(pbText[0]-0xb0)*(0xfe-0xa1+1)+(pbText[1]-0xa1);
|
uHanPos = (pbText[0] - 0xb0) * (0xfe - 0xa1 + 1) + (pbText[1] - 0xa1);
|
||||||
pbText[0]=rkTextConvTable.aacHan[uHanPos][0];
|
pbText[0]=rkTextConvTable.aacHan[uHanPos][0];
|
||||||
pbText[1]=rkTextConvTable.aacHan[uHanPos][1];
|
pbText[1]=rkTextConvTable.aacHan[uHanPos][1];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ bool CPythonNetworkStream::LoadConvertTable(DWORD dwEmpireID, const char* c_szFi
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
DWORD dwEngCount=26;
|
DWORD dwEngCount=26;
|
||||||
DWORD dwHanCount=(0xc8-0xb0+1)*(0xfe-0xa1+1);
|
DWORD dwHanCount = (0xc8 - 0xb0 + 1) * (0xfe - 0xa1 + 1);
|
||||||
DWORD dwHanSize=dwHanCount*2;
|
DWORD dwHanSize=dwHanCount*2;
|
||||||
DWORD dwFileSize=dwEngCount*2+dwHanSize;
|
DWORD dwFileSize=dwEngCount*2+dwHanSize;
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,12 @@
|
|||||||
#include "EterLib/FontManager.h"
|
#include "EterLib/FontManager.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
int _fltused = 0;
|
||||||
|
#else
|
||||||
extern int _fltused;
|
extern int _fltused;
|
||||||
FILE __iob_func[3] = { *stdin, *stdout, *stderr };
|
FILE __iob_func[3] = { *stdin, *stdout, *stderr };
|
||||||
|
#endif
|
||||||
volatile int _AVOID_FLOATING_POINT_LIBRARY_BUG = _fltused;
|
volatile int _AVOID_FLOATING_POINT_LIBRARY_BUG = _fltused;
|
||||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// Generated from the TEXTINCLUDE 2 resource.
|
// Generated from the TEXTINCLUDE 2 resource.
|
||||||
//
|
//
|
||||||
// #include "afxres.h"
|
// #include "afxres.h"
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
@@ -70,19 +70,19 @@ END
|
|||||||
// Cursor
|
// Cursor
|
||||||
//
|
//
|
||||||
|
|
||||||
IDC_CURSOR_NORMAL CURSOR "Cursors\\cursor.cur"
|
IDC_CURSOR_NORMAL CURSOR "Cursors/cursor.cur"
|
||||||
IDC_CURSOR_CHAIR CURSOR "Cursors\\cursor_chair.cur"
|
IDC_CURSOR_CHAIR CURSOR "Cursors/cursor_chair.cur"
|
||||||
IDC_CURSOR_DOOR CURSOR "Cursors\\cursor_door.cur"
|
IDC_CURSOR_DOOR CURSOR "Cursors/cursor_door.cur"
|
||||||
IDC_CURSOR_NO CURSOR "Cursors\\cursor_no.cur"
|
IDC_CURSOR_NO CURSOR "Cursors/cursor_no.cur"
|
||||||
IDC_CURSOR_PICK CURSOR "Cursors\\cursor_pick.cur"
|
IDC_CURSOR_PICK CURSOR "Cursors/cursor_pick.cur"
|
||||||
IDC_CURSOR_TALK CURSOR "Cursors\\cursor_talk.cur"
|
IDC_CURSOR_TALK CURSOR "Cursors/cursor_talk.cur"
|
||||||
IDC_CURSOR_ATTACK CURSOR "Cursors\\cursor_attack.cur"
|
IDC_CURSOR_ATTACK CURSOR "Cursors/cursor_attack.cur"
|
||||||
IDC_CURSOR_BUY CURSOR "Cursors\\cursor_buy.cur"
|
IDC_CURSOR_BUY CURSOR "Cursors/cursor_buy.cur"
|
||||||
IDC_CURSOR_SELL CURSOR "Cursors\\cursor_sell.cur"
|
IDC_CURSOR_SELL CURSOR "Cursors/cursor_sell.cur"
|
||||||
IDC_CURSOR_CAMERA_ROTATE CURSOR "Cursors\\cursor_camera_rotate.cur"
|
IDC_CURSOR_CAMERA_ROTATE CURSOR "Cursors/cursor_camera_rotate.cur"
|
||||||
IDC_CURSOR_HSIZE CURSOR "Cursors\\cursor_hsize.cur"
|
IDC_CURSOR_HSIZE CURSOR "Cursors/cursor_hsize.cur"
|
||||||
IDC_CURSOR_VSIZE CURSOR "Cursors\\cursor_vsize.cur"
|
IDC_CURSOR_VSIZE CURSOR "Cursors/cursor_vsize.cur"
|
||||||
IDC_CURSOR_HVSIZE CURSOR "Cursors\\cursor_hvsize.cur"
|
IDC_CURSOR_HVSIZE CURSOR "Cursors/cursor_hvsize.cur"
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
22
toolchains/linux-mingw64.cmake
Normal file
22
toolchains/linux-mingw64.cmake
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
set(CMAKE_SYSTEM_NAME Windows)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||||
|
|
||||||
|
get_filename_component(_TOOLCHAIN_DIR "${CMAKE_CURRENT_LIST_FILE}" DIRECTORY)
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||||
|
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||||
|
set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
|
||||||
|
set(CMAKE_LINKER "${_TOOLCHAIN_DIR}/mingw-lld-bin/x86_64-w64-mingw32-ld" CACHE FILEPATH "" FORCE)
|
||||||
|
|
||||||
|
set(_MINGW_LLD_FLAGS "-B${_TOOLCHAIN_DIR}/mingw-lld-bin -fuse-ld=lld")
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${_MINGW_LLD_FLAGS}" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${_MINGW_LLD_FLAGS}" CACHE STRING "" FORCE)
|
||||||
|
set(CMAKE_MODULE_LINKER_FLAGS "${_MINGW_LLD_FLAGS}" CACHE STRING "" FORCE)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||||
|
|
||||||
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
||||||
Reference in New Issue
Block a user