Port 2V0 UI Python bindings and app module link surface
This commit is contained in:
@@ -502,3 +502,4 @@
|
|||||||
{"time": "2026-09-23T11:00:00Z", "event": "port_round", "unit": "PORT-PLAN 批次 2P step 4 (macOS): the 40250 script layer starts inside the Godot process", "ported": [], "adapted": ["UserInterface/UserInterface.cpp:RunMainScript -> extension/src/platform/ScriptLib/PythonBoot.cpp (Start/RunMainScript/RunLine/Stop; 40250 keeps CPythonLauncher on Main()'s stack, Godot owns this process so the launcher has to outlive the call that starts it)", "EterBase/Debug.cpp:LogBox, EterBase/Debug.cpp:LogBoxf -> extension/src/platform/EterBase/Debug.cpp (stderr plus LastLogBoxMessage(); ScriptLib Traceback() reports through LogBoxf after PyErr_Fetch has cleared the exception, so this is the only place a script traceback survives)"], "deleted": [], "divergent": ["RunMainScript RegisterCommandLine passes the command line through unchanged: the -cs/-ncs auto-login decoding needs EterBase/Utils.cpp SplitLine and EterLib/Util.cpp base64_decode, both declared but not ported (批次 2V1). Nothing in this host passes -cs today.", "RunMainScript drops '--pause-before-create-window' (system(\"pause\")) and the XTrap init check: no console and no XTrap on macOS/Android.", "Of the 37 module initializers RunMainScript calls, only initpack() is called — the other 36 are 2V slices."], "needs_live": [], "staging": {"native": "extension/src/platform/ScriptLib/PythonBoot.{h,cpp} (godot-free, placed under ScriptLib because that is the directory port_logic/port_platform drop when `mtpython` is absent; compiled with the UserInterface library's definitions so its `#ifdef _DISTRIBUTE` gives __DEBUG__ = 0). extension/src/platform/EterBase/LogBox.h. extension/src/python_host_node.{h,cpp} -> GDScript class Metin2PythonHost (start/is_running/run_main_script/run_line/stop; each returns \"\" or the reason, and a build without the interpreter answers with a distinguishable message instead of failing to register).", "gdscript": "project/python_host_check.gd in two halves — the interpreter + stdlib half needs no 40250 pack and runs on any platform, the system.py half needs the pack and is skipped without it. project/python_host_test.gd (--script) is the desktop entry; MT_TEST_MODE=python in project/client_main.gd is the on-device entry, since export templates do not accept --script.", "boot": "Metin2PythonHost.start(\"\") stages the stdlib through Metin2Python.stdlib_path(), which until now had no caller outside python_stdlib_test.gd."}, "status_note": "macOS only. Android/iOS in-process is untouched: the APK cross-build is blocked on the GBK iconv issue (see the PORT-PLAN known-issue section, deferred by the user 2026-09-23), and a device has no 40250 Client/pack, so on a phone only the interpreter + stdlib half of the check can run. prototype.RunApp() is 2V0: system.py still stops at its first import. The real boot path (AppFlow) does not start the interpreter.", "tests": ["godot --headless --path project --script python_host_test.gd -> PASS: interpreter starts in-process, is_running(), a second start() is a no-op, `import os, string, types, codecs`, u'\\xe4'.encode('cp1252'), sys.path non-empty, system.py stops at ImportError: No module named app (identical to ctest port.python_launcher), stop() tears it down", "MT_TEST_MODE=python godot --headless --path project -> same result through client_main.gd", "ctest --test-dir build -> 27/27 passed (14.51s)"], "not_done": "Android/iOS 进程内验证;正式启动路径起解释器(2V0);RunMainScript 的 -cs 命令行解码(2V1)", "commit": "2P-step4-macos"}
|
{"time": "2026-09-23T11:00:00Z", "event": "port_round", "unit": "PORT-PLAN 批次 2P step 4 (macOS): the 40250 script layer starts inside the Godot process", "ported": [], "adapted": ["UserInterface/UserInterface.cpp:RunMainScript -> extension/src/platform/ScriptLib/PythonBoot.cpp (Start/RunMainScript/RunLine/Stop; 40250 keeps CPythonLauncher on Main()'s stack, Godot owns this process so the launcher has to outlive the call that starts it)", "EterBase/Debug.cpp:LogBox, EterBase/Debug.cpp:LogBoxf -> extension/src/platform/EterBase/Debug.cpp (stderr plus LastLogBoxMessage(); ScriptLib Traceback() reports through LogBoxf after PyErr_Fetch has cleared the exception, so this is the only place a script traceback survives)"], "deleted": [], "divergent": ["RunMainScript RegisterCommandLine passes the command line through unchanged: the -cs/-ncs auto-login decoding needs EterBase/Utils.cpp SplitLine and EterLib/Util.cpp base64_decode, both declared but not ported (批次 2V1). Nothing in this host passes -cs today.", "RunMainScript drops '--pause-before-create-window' (system(\"pause\")) and the XTrap init check: no console and no XTrap on macOS/Android.", "Of the 37 module initializers RunMainScript calls, only initpack() is called — the other 36 are 2V slices."], "needs_live": [], "staging": {"native": "extension/src/platform/ScriptLib/PythonBoot.{h,cpp} (godot-free, placed under ScriptLib because that is the directory port_logic/port_platform drop when `mtpython` is absent; compiled with the UserInterface library's definitions so its `#ifdef _DISTRIBUTE` gives __DEBUG__ = 0). extension/src/platform/EterBase/LogBox.h. extension/src/python_host_node.{h,cpp} -> GDScript class Metin2PythonHost (start/is_running/run_main_script/run_line/stop; each returns \"\" or the reason, and a build without the interpreter answers with a distinguishable message instead of failing to register).", "gdscript": "project/python_host_check.gd in two halves — the interpreter + stdlib half needs no 40250 pack and runs on any platform, the system.py half needs the pack and is skipped without it. project/python_host_test.gd (--script) is the desktop entry; MT_TEST_MODE=python in project/client_main.gd is the on-device entry, since export templates do not accept --script.", "boot": "Metin2PythonHost.start(\"\") stages the stdlib through Metin2Python.stdlib_path(), which until now had no caller outside python_stdlib_test.gd."}, "status_note": "macOS only. Android/iOS in-process is untouched: the APK cross-build is blocked on the GBK iconv issue (see the PORT-PLAN known-issue section, deferred by the user 2026-09-23), and a device has no 40250 Client/pack, so on a phone only the interpreter + stdlib half of the check can run. prototype.RunApp() is 2V0: system.py still stops at its first import. The real boot path (AppFlow) does not start the interpreter.", "tests": ["godot --headless --path project --script python_host_test.gd -> PASS: interpreter starts in-process, is_running(), a second start() is a no-op, `import os, string, types, codecs`, u'\\xe4'.encode('cp1252'), sys.path non-empty, system.py stops at ImportError: No module named app (identical to ctest port.python_launcher), stop() tears it down", "MT_TEST_MODE=python godot --headless --path project -> same result through client_main.gd", "ctest --test-dir build -> 27/27 passed (14.51s)"], "not_done": "Android/iOS 进程内验证;正式启动路径起解释器(2V0);RunMainScript 的 -cs 命令行解码(2V1)", "commit": "2P-step4-macos"}
|
||||||
{"time": "2026-09-23T11:40:00Z", "event": "port_round", "unit": "PORT-PLAN 批次 2V0-a: the EterPythonLib window-system headers enter the mirror", "ported": ["EterPythonLib/StdAfx.h", "EterPythonLib/PythonGraphic.h", "EterPythonLib/PythonWindow.h", "EterPythonLib/PythonWindowManager.h", "EterPythonLib/PythonSlotWindow.h", "EterPythonLib/PythonGridSlotWindow.h"], "adapted": [], "deleted": [], "divergent": [], "needs_live": [], "staging": {"scope": "headers only; no .cpp unit and therefore no port-map entry — declarations, nothing to call. The EterPythonLib .cpp units are 2V0-b.", "mechanical": "port_copy.py copy, 0 of 6 with manual edits: every one compiles as a mechanical CP949->UTF-8 / CRLF->LF / include-case copy.", "stdafx": "EterPythonLib/StdAfx.h had to come first: port_header_gate compiles each header behind its library's StdAfx.h, as 40250 does, and without it these five see neither <Python.h>, the STL, nor CSingleton.", "slice_list_correction": "audit/slices/2V0.json lists EterLib/Dimm.h as a missing header. It is not: 40250 vendors the MIDL output of the Windows SDK <dimm.h> as EterLib/Dimm.h, and extension/src/port/common/shim/win32/Dimm.h already shims it (a mirror copy shadows the shim for EterLib/IME.h's quoted include and breaks the build on 'rpc.h'). Copied, found, and removed again."}, "status_note": "2V0 entry state measured: of the slice's 212 headers 164 were already in the mirror, 48 were not (1 EterLib = the SDK shim above, 5 EterPythonLib = this round, 42 UserInterface = 2V0-d, all behind UserInterface/PythonApplication.h). Of the 10 units, 2 are ported (ScriptLib/PythonLauncher.cpp, UserInterface/PythonPackModule.cpp) and 8 are not.", "tests": ["cmake --build build --target port_header_gate -> the 6 new gate translation units compile (each header alone, twice, behind EterPythonLib/StdAfx.h)", "ctest --test-dir build -> 27/27 passed"], "not_done": "EterPythonLib/*.cpp(2V0-b);wndMgr/grp/grpImage/grpText 模块(2V0-c);42 个 UserInterface 头 + PythonApplicationModule.cpp(2V0-d)", "commit": "2V0-a"}
|
{"time": "2026-09-23T11:40:00Z", "event": "port_round", "unit": "PORT-PLAN 批次 2V0-a: the EterPythonLib window-system headers enter the mirror", "ported": ["EterPythonLib/StdAfx.h", "EterPythonLib/PythonGraphic.h", "EterPythonLib/PythonWindow.h", "EterPythonLib/PythonWindowManager.h", "EterPythonLib/PythonSlotWindow.h", "EterPythonLib/PythonGridSlotWindow.h"], "adapted": [], "deleted": [], "divergent": [], "needs_live": [], "staging": {"scope": "headers only; no .cpp unit and therefore no port-map entry — declarations, nothing to call. The EterPythonLib .cpp units are 2V0-b.", "mechanical": "port_copy.py copy, 0 of 6 with manual edits: every one compiles as a mechanical CP949->UTF-8 / CRLF->LF / include-case copy.", "stdafx": "EterPythonLib/StdAfx.h had to come first: port_header_gate compiles each header behind its library's StdAfx.h, as 40250 does, and without it these five see neither <Python.h>, the STL, nor CSingleton.", "slice_list_correction": "audit/slices/2V0.json lists EterLib/Dimm.h as a missing header. It is not: 40250 vendors the MIDL output of the Windows SDK <dimm.h> as EterLib/Dimm.h, and extension/src/port/common/shim/win32/Dimm.h already shims it (a mirror copy shadows the shim for EterLib/IME.h's quoted include and breaks the build on 'rpc.h'). Copied, found, and removed again."}, "status_note": "2V0 entry state measured: of the slice's 212 headers 164 were already in the mirror, 48 were not (1 EterLib = the SDK shim above, 5 EterPythonLib = this round, 42 UserInterface = 2V0-d, all behind UserInterface/PythonApplication.h). Of the 10 units, 2 are ported (ScriptLib/PythonLauncher.cpp, UserInterface/PythonPackModule.cpp) and 8 are not.", "tests": ["cmake --build build --target port_header_gate -> the 6 new gate translation units compile (each header alone, twice, behind EterPythonLib/StdAfx.h)", "ctest --test-dir build -> 27/27 passed"], "not_done": "EterPythonLib/*.cpp(2V0-b);wndMgr/grp/grpImage/grpText 模块(2V0-c);42 个 UserInterface 头 + PythonApplicationModule.cpp(2V0-d)", "commit": "2V0-a"}
|
||||||
{"time": "2026-09-23T02:17:52Z", "event": "port_round", "unit": "PORT-PLAN 批次 2V0-b: window tree completion and 64-bit LZO boundary repair", "ported": ["EterPythonLib/PythonWindow.cpp (211 functions)", "EterPythonLib/PythonWindowManager.cpp (76)", "EterPythonLib/PythonSlotWindow.cpp (80)", "EterPythonLib/PythonGridSlotWindow.cpp (14)", "EterLib/ReferenceObject.cpp (9)", "EterLib/Resource.cpp (18)", "EterLib/ResourceManager.cpp (25)"], "adapted": ["EterBase/lzo.cpp: CLZObject::Compress and CLZObject::Decompress use native-width lzo_uint at the liblzo API while retaining 32-bit pack-header lengths"], "divergent": [], "needs_live": [], "status_note": "The seven units in b4c9d6ce are exact mechanical copies of 40250 (0 manual edits); their 433 functions are recorded in port-map. The original port.window_tree test had four expectations contrary to 40250: DeactivateWindow restores the previous active window and SetTop changes update order; corrected the expectations. A fresh 64-bit build exposed stack corruption in the older LZO caller because Win32 UINT (4 bytes) was passed as native lzo_uint* (8 bytes); fixed the boundary. The normal app path still does not load the UI shell; module registration and rendering remain 2V0-c through 2V0-f.", "tests": ["port_copy.py diff on seven units: 0 manual edits", "ctest -R port.window_tree: pass", "ctest -R port.eterpack: pass, including added LZO compress/decompress round trip and full pack inventory", "ctest -R port.python_launcher: pass", "ctest --test-dir build --output-on-failure -j6: 28/28 pass", "port_map.py check: 0 errors"], "not_done": "2V0-c through 2V0-f; normal app startup and visible interactive Logo/Popup are the whole 2V0 acceptance gate, not the 2V0-b substep.", "commit": "2V0-b-completion"}
|
{"time": "2026-09-23T02:17:52Z", "event": "port_round", "unit": "PORT-PLAN 批次 2V0-b: window tree completion and 64-bit LZO boundary repair", "ported": ["EterPythonLib/PythonWindow.cpp (211 functions)", "EterPythonLib/PythonWindowManager.cpp (76)", "EterPythonLib/PythonSlotWindow.cpp (80)", "EterPythonLib/PythonGridSlotWindow.cpp (14)", "EterLib/ReferenceObject.cpp (9)", "EterLib/Resource.cpp (18)", "EterLib/ResourceManager.cpp (25)"], "adapted": ["EterBase/lzo.cpp: CLZObject::Compress and CLZObject::Decompress use native-width lzo_uint at the liblzo API while retaining 32-bit pack-header lengths"], "divergent": [], "needs_live": [], "status_note": "The seven units in b4c9d6ce are exact mechanical copies of 40250 (0 manual edits); their 433 functions are recorded in port-map. The original port.window_tree test had four expectations contrary to 40250: DeactivateWindow restores the previous active window and SetTop changes update order; corrected the expectations. A fresh 64-bit build exposed stack corruption in the older LZO caller because Win32 UINT (4 bytes) was passed as native lzo_uint* (8 bytes); fixed the boundary. The normal app path still does not load the UI shell; module registration and rendering remain 2V0-c through 2V0-f.", "tests": ["port_copy.py diff on seven units: 0 manual edits", "ctest -R port.window_tree: pass", "ctest -R port.eterpack: pass, including added LZO compress/decompress round trip and full pack inventory", "ctest -R port.python_launcher: pass", "ctest --test-dir build --output-on-failure -j6: 28/28 pass", "port_map.py check: 0 errors"], "not_done": "2V0-c through 2V0-f; normal app startup and visible interactive Logo/Popup are the whole 2V0 acceptance gate, not the 2V0-b substep.", "commit": "2V0-b-completion"}
|
||||||
|
{"time": "2026-09-23T02:57:22Z", "event": "port_round", "unit": "PORT-PLAN 2V0-c/d and beginning of 2V0-e", "ported": ["EterPythonLib/PythonWindowManagerModule.cpp", "EterPythonLib/PythonGraphicModule.cpp", "EterPythonLib/PythonGraphicImageModule.cpp", "EterPythonLib/PythonGraphicTextModule.cpp", "EterPythonLib/PythonGraphicThingModule.cpp", "UserInterface/PythonApplicationModule.cpp", "ScriptLib/PythonDebugModule.cpp", "42 UserInterface dependency headers"], "adapted": ["Python pointer handles via PyLong_FromVoidPtr/PyLong_AsVoidPtr (native pointer width)", "Win32 FindFirstFile/FindNextFile shim for app file enumeration", "Godot PythonBoot registers dbg, grp, grpImage, grpText, wndMgr and app and propagates dbg.LogBox failures"], "divergent": ["CPythonApplication platform lifecycle and graphics methods remain MT_PLATFORM_STUB; no visible Logo/Popup yet", "DevIL image and DirectShow logo backends remain MT_PLATFORM_STUB"], "tests": ["cmake --build build -> pass", "ctest --test-dir build --output-on-failure -j6 -> 29/29 passed, 1 skipped", "godot --headless --path project --script python_host_test.gd -> system.py reaches constInfo.py import net and reports ImportError through RunMainScript", "port_map.py check -> 0 errors"], "not_done": "2V0-e native gameplay module stubs and prototype.RunApp; 2V0-f Godot UI renderer/input/Logo/Popup runtime acceptance", "status_note": "The app binding imports, but its CPythonApplication adapter is only a link surface. The 2V0 acceptance gate is not yet met."}
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"reference": "EterPythonLib/PythonGraphicImageModule.cpp",
|
||||||
|
"reference_sha256": "1baa501715a276d533c0bc79718e12f57d15b1fb08d87ba03c4f3b2814afdce3",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"PyTuple_GetImageInstance": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:PyTuple_GetImageInstance"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PyTuple_GetExpandedImageInstance": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:PyTuple_GetExpandedImageInstance"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageGenerate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageGenerate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageGenerateExpanded": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageGenerateExpanded"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageGenerateFromHandle": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageGenerateFromHandle"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageDelete": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageDelete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageDeleteExpanded": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageDeleteExpanded"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageSetFileName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageSetFileName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpImageRender": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpImageRender"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetImagePosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetImagePosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetImageOrigin": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetImageOrigin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetImageRotation": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetImageRotation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetImageScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetImageScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetRenderingRect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetRenderingRect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetImageDiffuseColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpSetImageDiffuseColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetWidth": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpGetWidth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetHeight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:grpGetHeight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initgrpImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicImageModule.cpp:initgrpImage"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,339 @@
|
|||||||
|
{
|
||||||
|
"reference": "EterPythonLib/PythonGraphicModule.cpp",
|
||||||
|
"reference_sha256": "5ef45f5997988815a6e074a35bd8a56231efffa0b4ff3efd0dd7bd316e6c8d8a",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"grpCreateTextBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpCreateTextBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpCreateBigTextBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpCreateBigTextBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpDestroyTextBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpDestroyTextBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderTextBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderTextBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextBarSetTextColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpTextBarSetTextColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextBarGetTextExtent": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpTextBarGetTextExtent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextBarTextOut": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpTextBarTextOut"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpClearTextBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpClearTextBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetTextBarClipRect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetTextBarClipRect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpCulling": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpCulling"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpInitScreenEffect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpInitScreenEffect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpClearDepthBuffer": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpClearDepthBuffer"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpPushState": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpPushState"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpPopState": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpPopState"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpPushMatrix": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpPushMatrix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpPopMatrix": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpPopMatrix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTranslate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpTranslate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRotate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRotate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetColorRenderState": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetColorRenderState"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetAroundCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetAroundCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetPositionCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetPositionCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetEyeCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetEyeCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetPerspective": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetPerspective"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetOrtho2D": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetOrtho2D"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetOrtho3D": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetOrtho3D"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGenerateColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpGenerateColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetAlpha": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetAlpha"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetCursorPosition3d": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpGetCursorPosition3d"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetCursorPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetCursorPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderRoundBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderRoundBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderCube": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderCube"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderBar3d": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderBar3d"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderGradationBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderGradationBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderDownButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderDownButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderUpButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderUpButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRenderBox3d": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRenderBox3d"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetClearColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetClearColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetDiffuseColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetDiffuseColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpIdentity": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpIdentity"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetAvailableMemory": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpGetAvailableMemory"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSaveScreenShotToPath": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSaveScreenShotToPath"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSaveScreenShot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSaveScreenShot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetGamma": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetGamma"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetInterfaceRenderState": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetInterfaceRenderState"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetGameRenderState": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetGameRenderState"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetViewport": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetViewport"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpRestoreViewport": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpRestoreViewport"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetOmniLight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpSetOmniLight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetCameraPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpGetCameraPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetTargetPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:grpGetTargetPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initgrp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicModule.cpp:initgrp"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"reference": "EterPythonLib/PythonGraphicTextModule.cpp",
|
||||||
|
"reference_sha256": "a49b35e36427c263b1ea179b241c886fb205974f91c7211ea60fa86cdea25c5c",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"PyTuple_GetTextInstance": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:PyTuple_GetTextInstance"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextGenerate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextGenerate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextDestroy": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextDestroy"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextGetSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextGetSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetText"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetSecret": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetSecret"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextOutline": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextOutline"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextGetText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextGetText"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetFontName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetFontName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetFontColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetFontColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextSetOutLineColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextSetOutLineColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextRender": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextRender"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextUpdate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextUpdate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextShowCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextShowCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextHideCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextHideCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetHorizontalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpSetHorizontalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetVerticalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpSetVerticalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetMax": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpSetMax"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetSplitingTextLineCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpGetSplitingTextLineCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpGetSplitingTextLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpGetSplitingTextLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpTextPixelPositionToCharacterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:grpTextPixelPositionToCharacterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initgrpText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicTextModule.cpp:initgrpText"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"reference": "EterPythonLib/PythonGraphicThingModule.cpp",
|
||||||
|
"reference_sha256": "d6306a86136347ad1ec24143c4ea7aa93d32fb9559c2a33e07389a3602f70400",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"PyTuple_GetThingInstance": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:PyTuple_GetThingInstance"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpThingGenerate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpThingGenerate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpThingDelete": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpThingDelete"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpThingSetFileName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpThingSetFileName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpThingRender": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpThingRender"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpThingUpdate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpThingUpdate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetThingPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpSetThingPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetThingRotation": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpSetThingRotation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"grpSetThingScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:grpSetThingScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initgrpThing": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonGraphicThingModule.cpp:initgrpThing"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,954 @@
|
|||||||
|
{
|
||||||
|
"reference": "EterPythonLib/PythonWindowManagerModule.cpp",
|
||||||
|
"reference_sha256": "472c1c91ab9c3c9dc9b31f88c6f312e3ff0db82b33c2300f5555be8a9f196446",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"PyTuple_GetWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:PyTuple_GetWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetAspect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetAspect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrOnceIgnoreMouseLeftButtonUpEvent": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrOnceIgnoreMouseLeftButtonUpEvent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetMouseHandler": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetMouseHandler"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegister": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegister"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
},
|
||||||
|
"wndMgrRegisterSlotWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterSlotWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterGridSlotWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterGridSlotWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterTextLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterTextLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterMarkBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterMarkBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterImageBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterImageBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterExpandedImageBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterExpandedImageBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterAniImageBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterAniImageBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterRadioButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterRadioButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterToggleButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterToggleButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterDragButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterDragButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterBar": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterBar"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterBar3D": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterBar3D"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRegisterNumberLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRegisterNumberLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrDestroy": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrDestroy"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
},
|
||||||
|
"wndMgrIsFocus": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsFocus"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetFocus": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetFocus"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrKillFocus": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrKillFocus"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrLock": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrLock"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrUnlock": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrUnlock"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetName"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
},
|
||||||
|
"wndMgrSetTop": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetTop"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrShow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrShow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrHide": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrHide"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsShow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsShow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsRTL": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsRTL"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetScreenSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetScreenSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetParent": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetParent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetPickAlways": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetPickAlways"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetWndSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetWndSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetWndPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetWndPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetWndWidth": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetWndWidth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetWndHeight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetWndHeight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetWndLocalPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetWndLocalPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetWndGlobalPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetWndGlobalPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetWindowRect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetWindowRect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetWindowHorizontalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetWindowHorizontalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetWindowVerticalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetWindowVerticalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsIn": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsIn"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetMouseLocalPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetMouseLocalPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetHyperlink": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetHyperlink"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetScreenWidth": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetScreenWidth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetScreenHeight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetScreenHeight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetMousePosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetMousePosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsDragging": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsDragging"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsPickedWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsPickedWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetChildCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetChildCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrAddFlag": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrAddFlag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetLimitBias": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetLimitBias"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrUpdateRect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrUpdateRect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrAppendSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrAppendSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrArrangeSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrArrangeSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotBaseImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotBaseImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetCoverButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetCoverButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrEnableCoverButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrEnableCoverButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrDisableCoverButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrDisableCoverButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsDisableCoverButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsDisableCoverButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetAlwaysRenderCoverButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetAlwaysRenderCoverButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrAppendSlotButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrAppendSlotButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrAppendRequirementSignImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrAppendRequirementSignImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrShowSlotButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrShowSlotButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrHideAllSlotButton": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrHideAllSlotButton"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrShowRequirementSign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrShowRequirementSign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrHideRequirementSign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrHideRequirementSign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrRefreshSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrRefreshSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetUseMode": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetUseMode"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetUsableItem": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetUsableItem"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrClearSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrClearSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrClearAllSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrClearAllSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrHasSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrHasSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotCountNew": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotCountNew"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotCoolTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotCoolTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetToggleSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetToggleSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrActivateSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrActivateSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrDeactivateSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrDeactivateSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrEnableSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrEnableSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrDisableSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrDisableSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrShowSlotBaseImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrShowSlotBaseImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrHideSlotBaseImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrHideSlotBaseImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotType": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotType"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetSlotStyle": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetSlotStyle"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSelectSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSelectSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrClearSelected": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrClearSelected"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetSelectedSlotCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetSelectedSlotCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetSelectedSlotNumber": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetSelectedSlotNumber"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrIsSelectedSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrIsSelectedSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrGetSlotCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrGetSlotCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrLockSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrLockSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrUnlockSlot": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrUnlockSlot"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndBarSetColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndBarSetColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrAttachIcon": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrAttachIcon"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrDeattachIcon": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrDeattachIcon"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetAttachingFlag": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetAttachingFlag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetMax": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetMax"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetHorizontalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetHorizontalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetVerticalAlign": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetVerticalAlign"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetSecret": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetSecret"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetOutline": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetOutline"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetFeather": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetFeather"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetMultiLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetMultiLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetFontName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetFontName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetFontColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetFontColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetLimitWidth": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetLimitWidth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextSetText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextSetText"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextGetText": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextGetText"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextGetTextSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextGetTextSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextShowCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextShowCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextHideCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextHideCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndTextGetCursorPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndTextGetCursorPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndNumberSetNumber": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndNumberSetNumber"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndNumberSetNumberHorizontalAlignCenter": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndNumberSetNumberHorizontalAlignCenter"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndNumberSetNumberHorizontalAlignRight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndNumberSetNumberHorizontalAlignRight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndNumberSetPath": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndNumberSetPath"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_SetImageFilename": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_SetImageFilename"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_SetImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_SetImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_Load": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_Load"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_SetIndex": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_SetIndex"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_SetScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_SetScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMarkBox_SetDiffuseColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMarkBox_SetDiffuseColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageLoadImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageLoadImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetDiffuseColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetDiffuseColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageGetWidth": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageGetWidth"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageGetHeight": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageGetHeight"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetOrigin": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetOrigin"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetRotation": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetRotation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetRenderingRect": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetRenderingRect"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetRenderingMode": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetRenderingMode"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageSetDelay": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageSetDelay"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndImageAppendImage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndImageAppendImage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetUpVisual": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetUpVisual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetOverVisual": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetOverVisual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetDownVisual": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetDownVisual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetDisableVisual": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetDisableVisual"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonGetUpVisualFileName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonGetUpVisualFileName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonGetOverVisualFileName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonGetOverVisualFileName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonGetDownVisualFileName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonGetDownVisualFileName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonFlash": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonFlash"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonDisable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonDisable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonDown": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonDown"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetUp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetUp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonSetRestrictMovementArea": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonSetRestrictMovementArea"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndButtonIsDown": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndButtonIsDown"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrSetOutlineFlag": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrSetOutlineFlag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"wndMgrShowOverInWindowName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:wndMgrShowOverInWindowName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initwndMgr": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/EterPythonLib/PythonWindowManagerModule.cpp:initwndMgr"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"reference": "ScriptLib/PythonDebugModule.cpp",
|
||||||
|
"reference_sha256": "2b2fa7c750cd61f3a9bfb58088ea9f277b56a52bf7c8c0a068ca5bd6aaa7f2f9",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"dbgLogBox": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:dbgLogBox"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dbgTrace": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:dbgTrace"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dbgTracen": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:dbgTracen"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dbgTraceError": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:dbgTraceError"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dbgRegisterExceptionString": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:dbgRegisterExceptionString"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initdbg": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/ScriptLib/PythonDebugModule.cpp:initdbg"
|
||||||
|
],
|
||||||
|
"test": "project/python_host_check.gd (Godot system.py import)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,669 @@
|
|||||||
|
{
|
||||||
|
"reference": "UserInterface/PythonApplicationModule.cpp",
|
||||||
|
"reference_sha256": "8fa802b3ae55e7de225ddb5dc3ed0b2a822d14e4dd754a64aacd6978be21dd10",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"appShowWebPage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appShowWebPage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appMoveWebPage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appMoveWebPage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appHideWebPage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appHideWebPage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsWebPageMode": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsWebPageMode"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appEnablePerformanceTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appEnablePerformanceTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetTextTailLivingTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetTextTailLivingTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetHairColorEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetHairColorEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetArmorSpecularEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetArmorSpecularEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetWeaponSpecularEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetWeaponSpecularEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetSkillEffectUpgradeEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetSkillEffectUpgradeEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"SetTwoHandedWeaponAttSpeedDecreaseValue": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:SetTwoHandedWeaponAttSpeedDecreaseValue"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetRideHorseEnable": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetRideHorseEnable"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCameraMaxDistance": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCameraMaxDistance"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetControlFP": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetControlFP"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetSpecularSpeed": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetSpecularSpeed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetMinFog": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetMinFog"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetFrameSkip": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetFrameSkip"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appForceSetLocale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appForceSetLocale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetLocaleServiceName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetLocaleServiceName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCHEONMA": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCHEONMA"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsCHEONMA": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsCHEONMA"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLoadLocaleAddr": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLoadLocaleAddr"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLoadLocaleData": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLoadLocaleData"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetLocaleName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetLocaleName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetLocalePath": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetLocalePath"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetDefaultCodePage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetDefaultCodePage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetImageInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetImageInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsExistFile": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsExistFile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetFileList": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetFileList"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appUpdateGame": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appUpdateGame"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appRenderGame": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appRenderGame"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetMouseHandler": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetMouseHandler"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appCreate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appCreate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLoop": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLoop"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appProcess": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appProcess"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appAbort": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appAbort"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appExit": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appExit"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetCameraPitch": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetCameraPitch"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetCameraRotation": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetCameraRotation"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetGlobalTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetGlobalTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetGlobalTimeStamp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetGlobalTimeStamp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetUpdateFPS": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetUpdateFPS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetRenderFPS": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetRenderFPS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appRotateCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appRotateCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appPitchCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appPitchCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appZoomCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appZoomCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appMovieRotateCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appMovieRotateCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appMoviePitchCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appMoviePitchCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appMovieZoomCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appMovieZoomCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appMovieResetCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appMovieResetCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetFaceSpeed": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetFaceSpeed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetRenderTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetRenderTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetUpdateTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetUpdateTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetLoad": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetLoad"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetFaceCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetFaceCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetAvaiableTextureMememory": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetAvaiableTextureMememory"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetFPS": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetFPS"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetGlobalCenterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetGlobalCenterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCenterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCenterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetCursorPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetCursorPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appRunPythonFile": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appRunPythonFile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsPressed": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsPressed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appShowCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appShowCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appHideCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appHideCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsShowCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsShowCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsLiarCursorOn": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsLiarCursorOn"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetSoftwareCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetSoftwareCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetHardwareCursor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetHardwareCursor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetConnectData": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetConnectData"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetConnectData": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetConnectData"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetRandom": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetRandom"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetRotatingDirection": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetRotatingDirection"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetDegreeDifference": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetDegreeDifference"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSleep": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSleep"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetDefaultFontName": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetDefaultFontName"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetGuildSymbolPath": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetGuildSymbolPath"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appEnableSpecialCameraMode": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appEnableSpecialCameraMode"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCameraSpeed": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCameraSpeed"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsFileExist": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsFileExist"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetCameraSetting": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetCameraSetting"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSaveCameraSetting": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSaveCameraSetting"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLoadCameraSetting": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLoadCameraSetting"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetDefaultCamera": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetDefaultCamera"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetSightRange": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetSightRange"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"apptestGetAccumulationTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:apptestGetAccumulationTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"apptestResetAccumulationTime": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:apptestResetAccumulationTime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"apptestSetSpecularColor": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:apptestSetSpecularColor"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetVisibleNotice": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetVisibleNotice"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsVisibleNotice": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsVisibleNotice"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appEnableTestServerFlag": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appEnableTestServerFlag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsEnableTestServerFlag": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsEnableTestServerFlag"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appOpenTextFile": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appOpenTextFile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appCloseTextFile": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appCloseTextFile"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetTextFileLineCount": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetTextFileLineCount"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appGetTextFileLine": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appGetTextFileLine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appSetGuildMarkPath": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appSetGuildMarkPath"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsDevStage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsDevStage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsTestStage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsTestStage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appIsLiveStage": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appIsLiveStage"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLogoOpen": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLogoOpen"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLogoUpdate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLogoUpdate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLogoRender": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLogoRender"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"appLogoClose": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:appLogoClose"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initapp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonApplicationModule.cpp:initapp"
|
||||||
|
],
|
||||||
|
"test": "extension/tests/port_python_ui_modules_test.cpp (port.python_ui_modules)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
-3
@@ -397,9 +397,9 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
|||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| 2V0-a | `EterPythonLib/StdAfx.h` + 5 个窗口系统头进镜像,门禁绿 | 完成 |
|
| 2V0-a | `EterPythonLib/StdAfx.h` + 5 个窗口系统头进镜像,门禁绿 | 完成 |
|
||||||
| 2V0-b | `EterPythonLib/PythonWindow.cpp`、`PythonWindowManager.cpp`(窗口树逻辑;含 Slot/GridSlot 与资源层依赖) | 完成:原版源码机械移植,`port.window_tree` 通过;正式 UI 渲染仍属 2V0-f |
|
| 2V0-b | `EterPythonLib/PythonWindow.cpp`、`PythonWindowManager.cpp`(窗口树逻辑;含 Slot/GridSlot 与资源层依赖) | 完成:原版源码机械移植,`port.window_tree` 通过;正式 UI 渲染仍属 2V0-f |
|
||||||
| 2V0-c | `wndMgr` / `grp` / `grpImage` / `grpText` / `grpThing` 模块 | 未做 |
|
| 2V0-c | `wndMgr` / `grp` / `grpImage` / `grpText` / `grpThing` 模块 | 绑定已移植并通过导入/窗口句柄测试;图形绘制仍属 2V0-f |
|
||||||
| 2V0-d | 42 个 `UserInterface` 头(都在 `PythonApplication.h` 后面)+ `PythonApplicationModule.cpp`(`app`) | 未做 |
|
| 2V0-d | 42 个 `UserInterface` 头(都在 `PythonApplication.h` 后面)+ `PythonApplicationModule.cpp`(`app`) | 头与绑定已编译、链接并导入;应用生命周期 adapter 仍属 2V0-f |
|
||||||
| 2V0-e | `dbg` 等桩模块补齐,`system.py` 跑到 `prototype.RunApp()` | 未做 |
|
| 2V0-e | `dbg` 等桩模块补齐,`system.py` 跑到 `prototype.RunApp()` | 进行中:`dbg` 原版绑定已移植;Godot 进程内 `system.py` 目前停在 `constInfo.py` 的 `import net` |
|
||||||
| 2V0-f | Godot 渲染器上的 platform UI adapter;Logo/Popup 可显示可操作 | 未做 |
|
| 2V0-f | Godot 渲染器上的 platform UI adapter;Logo/Popup 可显示可操作 | 未做 |
|
||||||
2. **2V1 — 登录/选角**:加入 `PythonNetworkStream{,PhaseHandShake,PhaseLogin,PhaseSelect,PhaseLoading}.cpp`、
|
2. **2V1 — 登录/选角**:加入 `PythonNetworkStream{,PhaseHandShake,PhaseLogin,PhaseSelect,PhaseLoading}.cpp`、
|
||||||
`PythonNetworkStreamModule.cpp`、AccountConnector 及登录/选角脚本真实调用到的模块。验收为 FakeServer 离线完成 phase 顺序,
|
`PythonNetworkStreamModule.cpp`、AccountConnector 及登录/选角脚本真实调用到的模块。验收为 FakeServer 离线完成 phase 顺序,
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#include <il/il.h>
|
||||||
|
#include "../PlatformStub.h"
|
||||||
|
|
||||||
|
void ilGenImages(unsigned count, ILuint* images)
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
for (unsigned i = 0; i < count; ++i)
|
||||||
|
images[i] = 0;
|
||||||
|
}
|
||||||
|
void ilBindImage(ILuint) { MT_PLATFORM_STUB(); }
|
||||||
|
bool ilLoad(unsigned, const char*) { MT_PLATFORM_STUB(); return false; }
|
||||||
|
int ilGetInteger(unsigned) { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
void ilDeleteImages(unsigned, const ILuint*) { MT_PLATFORM_STUB(); }
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#include "EterLib/StdAfx.h"
|
||||||
|
#include "EterLib/Camera.h"
|
||||||
|
#include "../PlatformStub.h"
|
||||||
|
|
||||||
|
CCamera* CCameraManager::GetCurrentCamera()
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
@@ -11,6 +11,21 @@
|
|||||||
|
|
||||||
#include "../PlatformStub.h"
|
#include "../PlatformStub.h"
|
||||||
|
|
||||||
|
void CPythonGraphic::SetViewport(float, float, float, float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::RestoreViewport() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::SetOmniLight() { MT_PLATFORM_STUB(); }
|
||||||
|
long CPythonGraphic::GenerateColor(float, float, float, float) { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
void CPythonGraphic::RenderUpButton(float, float, float, float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::RenderDownButton(float, float, float, float) { MT_PLATFORM_STUB(); }
|
||||||
|
bool CPythonGraphic::SaveScreenShot(const char*) { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void CPythonGraphic::SetCursorPosition(int, int) { MT_PLATFORM_STUB(); }
|
||||||
|
DWORD CPythonGraphic::GetAvailableMemory() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
void CPythonGraphic::SetGameRenderState() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::SetInterfaceRenderState() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::PushState() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::PopState() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonGraphic::SetGamma(float) { MT_PLATFORM_STUB(); }
|
||||||
|
|
||||||
void CPythonGraphic::RenderCoolTimeBox(float fxCenter, float fyCenter, float fRadius, float fTime)
|
void CPythonGraphic::RenderCoolTimeBox(float fxCenter, float fyCenter, float fRadius, float fTime)
|
||||||
{
|
{
|
||||||
MT_PLATFORM_STUB();
|
MT_PLATFORM_STUB();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "ScriptLib/StdAfx.h"
|
#include "ScriptLib/StdAfx.h"
|
||||||
#include "ScriptLib/PythonLauncher.h"
|
#include "ScriptLib/PythonLauncher.h"
|
||||||
#include "UserInterface/StdAfx.h" // initpack and the rest of the module initializer list
|
#include "UserInterface/StdAfx.h" // initpack and the rest of the module initializer list
|
||||||
|
#include "EterPythonLib/StdAfx.h"
|
||||||
#include "PythonBoot.h"
|
#include "PythonBoot.h"
|
||||||
#include "PythonHost.h"
|
#include "PythonHost.h"
|
||||||
#include "../EterBase/LogBox.h"
|
#include "../EterBase/LogBox.h"
|
||||||
@@ -13,6 +14,7 @@ namespace
|
|||||||
{
|
{
|
||||||
// 40250 has this on Main()'s stack. CPythonLauncher is a CSingleton, so there is still only ever one.
|
// 40250 has this on Main()'s stack. CPythonLauncher is a CSingleton, so there is still only ever one.
|
||||||
std::unique_ptr<CPythonLauncher> g_launcher;
|
std::unique_ptr<CPythonLauncher> g_launcher;
|
||||||
|
std::unique_ptr<UI::CWindowManager> g_window_manager;
|
||||||
|
|
||||||
bool fail(std::string* error, const std::string& text)
|
bool fail(std::string* error, const std::string& text)
|
||||||
{
|
{
|
||||||
@@ -55,6 +57,7 @@ bool Start(const char* stdlib_path, std::string* error)
|
|||||||
Stop();
|
Stop();
|
||||||
return fail(error, "InstallStdLib(" + stdlib + "): " + stdlib_error);
|
return fail(error, "InstallStdLib(" + stdlib + "): " + stdlib_error);
|
||||||
}
|
}
|
||||||
|
g_window_manager = std::make_unique<UI::CWindowManager>();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,10 +69,14 @@ bool RunMainScript(const char* lpCmdLine, std::string* error)
|
|||||||
|
|
||||||
CPythonLauncher& pyLauncher = *g_launcher;
|
CPythonLauncher& pyLauncher = *g_launcher;
|
||||||
|
|
||||||
// The module initializers, in 40250's order. Everything after initpack (initdbg, initime, initgrp,
|
// The module initializers follow 40250's order; missing modules arrive in later 2V steps.
|
||||||
// initgrpImage, initgrpText, initwndMgr, initudp, initapp, ... initServerStateChecker) is a 2V slice:
|
|
||||||
// system.py stops at the first import of one of them, today `app`.
|
|
||||||
initpack();
|
initpack();
|
||||||
|
initdbg();
|
||||||
|
initgrp();
|
||||||
|
initgrpImage();
|
||||||
|
initgrpText();
|
||||||
|
initwndMgr();
|
||||||
|
initapp();
|
||||||
|
|
||||||
ClearLogBoxMessage();
|
ClearLogBoxMessage();
|
||||||
|
|
||||||
@@ -122,6 +129,10 @@ bool RunMainScript(const char* lpCmdLine, std::string* error)
|
|||||||
TraceError("RunMain Error");
|
TraceError("RunMain Error");
|
||||||
return fail(error, "RunMain Error: " + LastLogBoxMessage());
|
return fail(error, "RunMain Error: " + LastLogBoxMessage());
|
||||||
}
|
}
|
||||||
|
// system.py catches failures in prototype.py and calls dbg.LogBox. Its outer
|
||||||
|
// RunFile then succeeds, so surface that recorded failure to the Godot host.
|
||||||
|
if (!LastLogBoxMessage().empty())
|
||||||
|
return fail(error, "RunMain Error: " + LastLogBoxMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
NANOEND
|
NANOEND
|
||||||
@@ -143,6 +154,7 @@ void Stop()
|
|||||||
{
|
{
|
||||||
if (!g_launcher)
|
if (!g_launcher)
|
||||||
return;
|
return;
|
||||||
|
g_window_manager.reset();
|
||||||
g_launcher->Clear(); // Main() calls Clear() explicitly before the launcher leaves scope
|
g_launcher->Clear(); // Main() calls Clear() explicitly before the launcher leaves scope
|
||||||
g_launcher.reset();
|
g_launcher.reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,88 @@
|
|||||||
|
#include "UserInterface/StdAfx.h"
|
||||||
|
#include "UserInterface/PythonApplication.h"
|
||||||
|
#include "UserInterface/MarkManager.h"
|
||||||
|
#include "GameLib/GameUtil.h"
|
||||||
|
#include "EterLib/Camera.h"
|
||||||
|
#include "../PlatformStub.h"
|
||||||
|
|
||||||
|
// 2V0-d link surface. The application event loop and UI rendering are implemented in 2V0-f.
|
||||||
|
CPythonApplication* CPythonApplication::ms_pInstance = nullptr;
|
||||||
|
|
||||||
|
void CPythonApplication::ShowWebPage(const char*, const RECT&) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::MoveWebPage(const RECT&) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::HideWebPage() { MT_PLATFORM_STUB(); }
|
||||||
|
bool CPythonApplication::IsWebPageMode() { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void CPythonApplication::GetInfo(UINT, std::string* out) { MT_PLATFORM_STUB(); if (out) out->clear(); }
|
||||||
|
void CPythonApplication::Loop() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::Exit() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::Abort() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetMinFog(float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetFrameSkip(bool) { MT_PLATFORM_STUB(); }
|
||||||
|
bool CPythonApplication::Create(PyObject*, const char*, int, int, int) { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void CPythonApplication::UpdateGame() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::RenderGame() { MT_PLATFORM_STUB(); }
|
||||||
|
bool CPythonApplication::Process() { MT_PLATFORM_STUB(); return false; }
|
||||||
|
BOOL CPythonApplication::SetCursorNum(int) { MT_PLATFORM_STUB(); return FALSE; }
|
||||||
|
void CPythonApplication::SetCursorVisible(BOOL, bool) { MT_PLATFORM_STUB(); }
|
||||||
|
BOOL CPythonApplication::GetCursorVisible() { MT_PLATFORM_STUB(); return FALSE; }
|
||||||
|
bool CPythonApplication::GetLiarCursorOn() { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void CPythonApplication::SetCursorMode(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetMouseHandler(PyObject*) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetGlobalCenterPosition(LONG, LONG) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetCamera(float, float, float, float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::GetCamera(float* distance, float* pitch, float* rotation, float* height) {
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
if (distance) *distance = 0;
|
||||||
|
if (pitch) *pitch = 0;
|
||||||
|
if (rotation) *rotation = 0;
|
||||||
|
if (height) *height = 0;
|
||||||
|
}
|
||||||
|
void CPythonApplication::RotateCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::PitchCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::ZoomCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::MovieRotateCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::MoviePitchCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::MovieZoomCamera(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::MovieResetCamera() { MT_PLATFORM_STUB(); }
|
||||||
|
float CPythonApplication::GetRotation() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
float CPythonApplication::GetPitch() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
void CPythonApplication::SetFPS(int) { MT_PLATFORM_STUB(); }
|
||||||
|
time_t CPythonApplication::GetServerTime() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
time_t CPythonApplication::GetServerTimeStamp() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
void CPythonApplication::SetConnectData(const char*, int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::GetConnectData(std::string& ip, int& port) { MT_PLATFORM_STUB(); ip.clear(); port = 0; }
|
||||||
|
void CPythonApplication::EnableSpecialCameraMode() { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SetCameraSpeed(int) { MT_PLATFORM_STUB(); }
|
||||||
|
void CPythonApplication::SaveCameraSetting(const char*) { MT_PLATFORM_STUB(); }
|
||||||
|
bool CPythonApplication::LoadCameraSetting(const char*) { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void CPythonApplication::SetForceSightRange(int) { MT_PLATFORM_STUB(); }
|
||||||
|
|
||||||
|
void CCamera::SetResistance(float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CCamera::SetCameraMaxDistance(float) { MT_PLATFORM_STUB(); }
|
||||||
|
void CGuildMarkManager::SetMarkPathPrefix(const char*) { MT_PLATFORM_STUB(); }
|
||||||
|
void CMovieMan::PlayLogo(const char*) { MT_PLATFORM_STUB(); }
|
||||||
|
|
||||||
|
float GetDegreeDifference(float, float) { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
int GetRotatingDirection(float, float) { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
|
||||||
|
BOOL HAIR_COLOR_ENABLE = FALSE;
|
||||||
|
BOOL PERF_CHECKER_RENDER_GAME = FALSE;
|
||||||
|
BOOL RIDE_HORSE_ENABLE = FALSE;
|
||||||
|
BOOL SKILL_EFFECT_UPGRADE_ENABLE = FALSE;
|
||||||
|
BOOL USE_ARMOR_SPECULAR = FALSE;
|
||||||
|
BOOL USE_WEAPON_SPECULAR = FALSE;
|
||||||
|
D3DXCOLOR g_fSpecularColor;
|
||||||
|
double g_specularSpd = 0;
|
||||||
|
int g_iAccumulationTime = 0;
|
||||||
|
|
||||||
|
bool LoadLocaleData(const char*) { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void SetGuildSymbolPath(const char*) { MT_PLATFORM_STUB(); }
|
||||||
|
void DefaultFont_SetName(const char*) { MT_PLATFORM_STUB(); }
|
||||||
|
void TextTail_SetLivingTime(long) { MT_PLATFORM_STUB(); }
|
||||||
|
const char* LocaleService_GetName() { MT_PLATFORM_STUB(); return ""; }
|
||||||
|
bool LocaleService_IsCHEONMA() { MT_PLATFORM_STUB(); return false; }
|
||||||
|
void LocaleService_SetCHEONMA(bool) { MT_PLATFORM_STUB(); }
|
||||||
|
unsigned LocaleService_GetCodePage() { MT_PLATFORM_STUB(); return 0; }
|
||||||
|
const char* LocaleService_GetLocaleName() { MT_PLATFORM_STUB(); return ""; }
|
||||||
|
const char* LocaleService_GetLocalePath() { MT_PLATFORM_STUB(); return ""; }
|
||||||
|
void LocaleService_ForceSetLocale(const char*, const char*) { MT_PLATFORM_STUB(); }
|
||||||
@@ -180,5 +180,11 @@ if(BUILD_TESTING AND CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
|
|||||||
add_test(NAME port.window_tree
|
add_test(NAME port.window_tree
|
||||||
COMMAND $<TARGET_FILE:port_window_tree_test> ${MT_PYTHON_STDLIB_ZIP})
|
COMMAND $<TARGET_FILE:port_window_tree_test> ${MT_PYTHON_STDLIB_ZIP})
|
||||||
set_tests_properties(port.window_tree PROPERTIES SKIP_RETURN_CODE 77)
|
set_tests_properties(port.window_tree PROPERTIES SKIP_RETURN_CODE 77)
|
||||||
|
|
||||||
|
add_executable(port_python_ui_modules_test ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/port_python_ui_modules_test.cpp)
|
||||||
|
target_link_libraries(port_python_ui_modules_test PRIVATE port_platform)
|
||||||
|
add_dependencies(port_python_ui_modules_test mtpython_stdlib)
|
||||||
|
add_test(NAME port.python_ui_modules
|
||||||
|
COMMAND $<TARGET_FILE:port_python_ui_modules_test> ${MT_PYTHON_STDLIB_ZIP})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -0,0 +1,295 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "../common/PortPythonPointer.h" // PORT: preserve Win32 pointer handles on 64-bit hosts
|
||||||
|
|
||||||
|
bool PyTuple_GetImageInstance(PyObject* poArgs, int pos, CGraphicImageInstance** ppRetImageInstance)
|
||||||
|
{
|
||||||
|
return PyTuple_GetPointer(poArgs, pos, ppRetImageInstance) && *ppRetImageInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PyTuple_GetExpandedImageInstance(PyObject* poArgs, int pos, CGraphicExpandedImageInstance ** ppRetImageInstance)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance* image;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, pos, &image) || !image)
|
||||||
|
return false;
|
||||||
|
if (!image->IsType(CGraphicExpandedImageInstance::Type()))
|
||||||
|
return false;
|
||||||
|
*ppRetImageInstance = static_cast<CGraphicExpandedImageInstance*>(image);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageGenerate(PyObject * poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char * szFileName;
|
||||||
|
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szFileName))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
if (!*szFileName)
|
||||||
|
return Py_BuildValue("i", 0);
|
||||||
|
|
||||||
|
CResource * pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
|
||||||
|
|
||||||
|
if (!pResource->IsType(CGraphicImage::Type()))
|
||||||
|
return Py_BuildException("Resource is not an image (filename: %s)", szFileName);
|
||||||
|
|
||||||
|
CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New();
|
||||||
|
pImageInstance->SetImagePointer(static_cast<CGraphicImage*>(pResource));
|
||||||
|
|
||||||
|
if (pImageInstance->IsEmpty())
|
||||||
|
return Py_BuildException("Cannot load image (filename: %s)", szFileName);
|
||||||
|
|
||||||
|
return Py_BuildPointer(pImageInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageGenerateExpanded(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char * szFileName;
|
||||||
|
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szFileName))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
if (strlen(szFileName) <= 0)
|
||||||
|
return Py_BuildValue("i", 0);
|
||||||
|
|
||||||
|
CResource* pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
|
||||||
|
|
||||||
|
if (!pResource->IsType(CGraphicImage::Type()))
|
||||||
|
return Py_BuildException("Resource is not an image (filename: %s)", szFileName);
|
||||||
|
|
||||||
|
CGraphicExpandedImageInstance * pImageInstance = CGraphicExpandedImageInstance::New();
|
||||||
|
pImageInstance->SetImagePointer(static_cast<CGraphicImage*>(pResource));
|
||||||
|
|
||||||
|
if (pImageInstance->IsEmpty())
|
||||||
|
return Py_BuildException("Cannot load image (filename: %s)", szFileName);
|
||||||
|
|
||||||
|
return Py_BuildPointer(pImageInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageGenerateFromHandle(PyObject * poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImage* image;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &image))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
CGraphicImageInstance * pImageInstance = CGraphicImageInstance::New();
|
||||||
|
pImageInstance->SetImagePointer(image);
|
||||||
|
|
||||||
|
return Py_BuildPointer(pImageInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageDelete(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance * pImageInstance;
|
||||||
|
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
if (!pImageInstance)
|
||||||
|
return Py_BuildNone();
|
||||||
|
|
||||||
|
CGraphicImageInstance::Delete(pImageInstance);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageDeleteExpanded(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicExpandedImageInstance * pExpandedImageInstance;
|
||||||
|
if (!PyTuple_GetExpandedImageInstance(poArgs, 0, &pExpandedImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
CGraphicExpandedImageInstance::Delete(pExpandedImageInstance);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageSetFileName(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance * pImageInstance;
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
char * szFileName;
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szFileName))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
CResource * pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
|
||||||
|
|
||||||
|
if (!pResource->IsType(CGraphicImage::Type()))
|
||||||
|
return Py_BuildException("Resource is not an image (filename: %s)", szFileName);
|
||||||
|
|
||||||
|
pImageInstance->SetImagePointer(static_cast<CGraphicImage*>(pResource));
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpImageRender(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance* pImageInstance;
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->Render();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetImagePosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance* pImageInstance;
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetPosition(x, y);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetImageOrigin(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicExpandedImageInstance * pImageInstance;
|
||||||
|
if (!PyTuple_GetExpandedImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetOrigin(x, y);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetImageRotation(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicExpandedImageInstance * pImageInstance;
|
||||||
|
if (!PyTuple_GetExpandedImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float Degree;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &Degree))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetRotation(Degree);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetImageScale(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicExpandedImageInstance * pImageInstance;
|
||||||
|
if (!PyTuple_GetExpandedImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetScale(x, y);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetRenderingRect(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicExpandedImageInstance * pImageInstance;
|
||||||
|
if (!PyTuple_GetExpandedImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float fLeft;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fLeft))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float fTop;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fTop))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float fRight;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &fRight))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float fBottom;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &fBottom))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetRenderingRect(fLeft, fTop, fRight, fBottom);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetImageDiffuseColor(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance* pImageInstance;
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
float r;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &r))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float g;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &g))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float b;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &b))
|
||||||
|
return Py_BadArgument();
|
||||||
|
float a;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &a))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
pImageInstance->SetDiffuseColor(r, g, b, a);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpGetWidth(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance * pImageInstance;
|
||||||
|
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
if (pImageInstance->IsEmpty())
|
||||||
|
return Py_BuildException("Image is empty");
|
||||||
|
|
||||||
|
return Py_BuildValue("i", pImageInstance->GetWidth());
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpGetHeight(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicImageInstance * pImageInstance;
|
||||||
|
|
||||||
|
if (!PyTuple_GetImageInstance(poArgs, 0, &pImageInstance))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
if (pImageInstance->IsEmpty())
|
||||||
|
return Py_BuildException("Image is empty");
|
||||||
|
|
||||||
|
return Py_BuildValue("i", pImageInstance->GetHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
void initgrpImage()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "Render", grpImageRender, METH_VARARGS },
|
||||||
|
{ "SetPosition", grpSetImagePosition, METH_VARARGS },
|
||||||
|
{ "Generate", grpImageGenerate, METH_VARARGS },
|
||||||
|
{ "GenerateExpanded", grpImageGenerateExpanded, METH_VARARGS },
|
||||||
|
{ "GenerateFromHandle", grpImageGenerateFromHandle, METH_VARARGS },
|
||||||
|
{ "Delete", grpImageDelete, METH_VARARGS },
|
||||||
|
{ "DeleteExpanded", grpImageDeleteExpanded, METH_VARARGS },
|
||||||
|
{ "SetFileName", grpImageSetFileName, METH_VARARGS },
|
||||||
|
{ "SetOrigin", grpSetImageOrigin, METH_VARARGS },
|
||||||
|
{ "SetRotation", grpSetImageRotation, METH_VARARGS },
|
||||||
|
{ "SetScale", grpSetImageScale, METH_VARARGS },
|
||||||
|
{ "SetRenderingRect", grpSetRenderingRect, METH_VARARGS },
|
||||||
|
{ "SetDiffuseColor", grpSetImageDiffuseColor, METH_VARARGS },
|
||||||
|
{ "GetWidth", grpGetWidth, METH_VARARGS },
|
||||||
|
{ "GetHeight", grpGetHeight, METH_VARARGS },
|
||||||
|
{ NULL, NULL, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
Py_InitModule("grpImage", s_methods);
|
||||||
|
}
|
||||||
@@ -0,0 +1,999 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "../common/PortPythonPointer.h" // PORT: preserve Win32 pointer handles on 64-bit hosts
|
||||||
|
#include "../EterLib/Camera.h"
|
||||||
|
#include "../EterLib/TextBar.h"
|
||||||
|
|
||||||
|
#include <shlobj.h>
|
||||||
|
|
||||||
|
PyObject* grpCreateTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int iWidth;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &iWidth))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iHeight;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iHeight))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CTextBar * pTextBar = new CTextBar(12, false);
|
||||||
|
if (!pTextBar->Create(NULL, iWidth, iHeight))
|
||||||
|
{
|
||||||
|
delete pTextBar;
|
||||||
|
return Py_BuildValue("i", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Py_BuildPointer(pTextBar);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpCreateBigTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int iWidth;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &iWidth))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iHeight;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iHeight))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iFontSize;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &iFontSize))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CTextBar * pTextBar = new CTextBar(iFontSize, true);
|
||||||
|
if (!pTextBar->Create(NULL, iWidth, iHeight))
|
||||||
|
{
|
||||||
|
delete pTextBar;
|
||||||
|
return Py_BuildValue("i", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Py_BuildPointer(pTextBar);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpDestroyTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
delete pTextBar;
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
int ix;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &ix))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &iy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (pTextBar)
|
||||||
|
pTextBar->Render(ix, iy);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextBarSetTextColor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
int r;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &r))
|
||||||
|
return Py_BuildException();
|
||||||
|
int g;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &g))
|
||||||
|
return Py_BuildException();
|
||||||
|
int b;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &b))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (pTextBar)
|
||||||
|
pTextBar->SetTextColor(r, g, b);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextBarGetTextExtent(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
char * szText;
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szText))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
SIZE size = {0, 0};
|
||||||
|
if (pTextBar)
|
||||||
|
pTextBar->GetTextExtent(szText, &size);
|
||||||
|
|
||||||
|
return Py_BuildValue("ii", size.cx, size.cy);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextBarTextOut(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
int ix;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &ix))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &iy))
|
||||||
|
return Py_BuildException();
|
||||||
|
char * szText;
|
||||||
|
if (!PyTuple_GetString(poArgs, 3, &szText))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (pTextBar)
|
||||||
|
pTextBar->TextOut(ix, iy, szText);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpClearTextBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (pTextBar)
|
||||||
|
pTextBar->ClearBar();
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetTextBarClipRect(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CTextBar* pTextBar;
|
||||||
|
if (!PyTuple_GetPointer(poArgs, 0, &pTextBar))
|
||||||
|
return Py_BuildException();
|
||||||
|
int isx;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &isx))
|
||||||
|
return Py_BuildException();
|
||||||
|
int isy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &isy))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iex;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &iex))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iey;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 4, &iey))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (pTextBar)
|
||||||
|
{
|
||||||
|
RECT rect;
|
||||||
|
rect.left = isx;
|
||||||
|
rect.top = isy;
|
||||||
|
rect.right = iex;
|
||||||
|
rect.bottom = iey;
|
||||||
|
|
||||||
|
pTextBar->SetClipRect(rect);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpCulling(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CCullingManager::Instance().Process();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpInitScreenEffect(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().InitScreenEffect();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpClearDepthBuffer(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().ClearDepthBuffer();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpPushState(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().PushState();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpPopState(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().PopState();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpPushMatrix(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().PushMatrix();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpPopMatrix(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().PopMatrix();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTranslate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &x))
|
||||||
|
return Py_BuildException("grp.Translate:Wrong X");
|
||||||
|
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &y))
|
||||||
|
return Py_BuildException("grp.Translate:Wrong Y");
|
||||||
|
|
||||||
|
float z;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &z))
|
||||||
|
return Py_BuildException("grp.Translate:Wrong Z");
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().Translate(x, y, z);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRotate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float Degree;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &Degree))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float z;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &z))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().Rotate(Degree, x, y, z);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetColorRenderState(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetAroundCamera(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float distance;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &distance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float pitch;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &pitch))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float roll;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &roll))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float lookAtZ;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &lookAtZ))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetAroundCamera(distance, pitch, roll, lookAtZ);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetPositionCamera(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float fx;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fx))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fy;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fz;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fz))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float distance;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &distance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float pitch;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &pitch))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float roll;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 5, &roll))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetPositionCamera(fx, fy, fz, distance, pitch, roll);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetEyeCamera(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float xEye;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &xEye))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float yEye;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &yEye))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zEye;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &zEye))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float xCenter;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &xCenter))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float yCenter;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &yCenter))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zCenter;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 5, &zCenter))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float xUp;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 6, &xUp))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float yUp;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 7, &yUp))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zUp;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 8, &zUp))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetEyeCamera(xEye, yEye, zEye, xCenter, yCenter, zCenter, xUp, yUp, zUp);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject* grpSetPerspective(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float fov;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fov))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float aspect;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &aspect))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zNear;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &zNear))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zFar;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &zFar))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetPerspective(fov, aspect, zNear, zFar);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject* grpSetOrtho2D(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float width;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float height;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float length;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &length))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetOrtho2D(width, height, length);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject* grpSetOrtho3D(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float width;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float height;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zmin;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &zmin))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float zmax;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &zmax))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetOrtho3D(width, height, zmin, zmax);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject* grpGenerateColor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float r;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &r))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float g;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &g))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float b;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &b))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float a;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &a))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
return Py_BuildValue("l", CPythonGraphic::Instance().GenerateColor(r, g, b, a));
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetColor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int color;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &color))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetDiffuseColor(DWORD(color));
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetAlpha(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float Alpha;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &Alpha))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
//CPythonGraphic::Instance().SetAlpha(Alpha);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpGetCursorPosition3d(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
CPythonGraphic::Instance().GetCursorPosition(&x, &y, &z);
|
||||||
|
return Py_BuildValue("(fff)", x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetCursorPosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
int ix;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &ix))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetCursorPosition(ix, iy);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderLine(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderLine2d((float) x, (float) y, (float) x+width, (float) y+height);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderRoundBox(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fx = float(x);
|
||||||
|
float fy = float(y);
|
||||||
|
float fWidth = float(width);
|
||||||
|
float fHeight = float(height);
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx+2.0f, fy, fx+2.0f + (fWidth-3.0f), fy);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx+2.0f, fy+fHeight, fx+2.0f + (fWidth-3.0f), fy+fHeight);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx, fy+2.0f, fx, fy+2.0f + fHeight-4.0f);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx+fWidth, fy+1.0f, fx+fWidth, fy+1.0f + fHeight-3.0f);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx, fy+2.0f, fx+2.0f, fy);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx, fy+fHeight-2.0f, fx+2.0f, fy+fHeight);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx+fWidth-2.0f, fy, fx+fWidth, fy+2.0f);
|
||||||
|
CPythonGraphic::Instance().RenderLine2d(fx+fWidth-2.0f, fy+fHeight, fx+fWidth, fy+fHeight-2.0f);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderBox(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderBox2d((float) x, (float) y, (float) x+width, (float) y+height);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderBar2d((float) x, (float) y, (float) x+width, (float) y+height);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderCube(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float sx;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &sx))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float sy;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &sy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float sz;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &sz))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ex;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &ex))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ey;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &ey))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ez;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 5, &ez))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderCube(sx, sy, sz, ex, ey, ez);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderBar3d(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int sx;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &sx))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int sy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &sy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int sz;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &sz))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int ex;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &ex))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int ey;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 4, &ey))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int ez;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 5, &ez))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderBar3d(sx, sy, sz, ex, ey, ez);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpRenderGradationBar(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
int iStartColor;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 4, &iStartColor))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
int iEndColor;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 5, &iEndColor))
|
||||||
|
return Py_BadArgument();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderGradationBar2d((float)x, (float)y, (float)x+width, (float)y+height, iStartColor, iEndColor);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderDownButton(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderDownButton((float) x, (float) y, (float) x+width, (float) y+height);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderUpButton(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int y;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &width))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int height;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 3, &height))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderUpButton((float) x, (float) y, (float) x+width, (float) y+height);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpRenderBox3d(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
float sx;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &sx))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float sy;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &sy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float sz;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &sz))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ex;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &ex))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ey;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &ey))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float ez;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 5, &ez))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().RenderBox3d((float) sx, (float) sy, (float) sz, (float) ex, (float) ey, (float) ez);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetClearColor(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fr;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fr))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fg;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fg))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fb;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fb))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetClearColor(fr, fg, fb, 1.0f);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetDiffuseColor(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float r;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &r))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float g;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &g))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float b;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &b))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float a;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &a))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetDiffuseColor(r, g, b, a);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpIdentity(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().Identity();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpGetAvailableMemory(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
int iValue = CPythonGraphic::Instance().GetAvailableMemory();
|
||||||
|
return Py_BuildValue("i", iValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// SCREENSHOT_CWDSAVE
|
||||||
|
PyObject * grpSaveScreenShotToPath(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
char * szBasePath;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szBasePath))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
struct tm * tmNow;
|
||||||
|
time_t ct;
|
||||||
|
|
||||||
|
ct = time(0);
|
||||||
|
tmNow = localtime(&ct);
|
||||||
|
|
||||||
|
char szPath[MAX_PATH + 256];
|
||||||
|
snprintf(szPath, sizeof(szPath), "%s%02d%02d_%02d%02d%02d.jpg",
|
||||||
|
szBasePath,
|
||||||
|
tmNow->tm_mon + 1,
|
||||||
|
tmNow->tm_mday,
|
||||||
|
tmNow->tm_hour,
|
||||||
|
tmNow->tm_min,
|
||||||
|
tmNow->tm_sec);
|
||||||
|
|
||||||
|
BOOL bResult = CPythonGraphic::Instance().SaveScreenShot(szPath);
|
||||||
|
return Py_BuildValue("(is)", bResult, szPath);
|
||||||
|
}
|
||||||
|
// END_OF_SCREENSHOT_CWDSAVE
|
||||||
|
|
||||||
|
PyObject * grpSaveScreenShot(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
struct tm * tmNow;
|
||||||
|
time_t ct;
|
||||||
|
|
||||||
|
ct = time(0);
|
||||||
|
tmNow = localtime(&ct);
|
||||||
|
|
||||||
|
char szPath[MAX_PATH + 256];
|
||||||
|
SHGetSpecialFolderPath(NULL, szPath, CSIDL_PERSONAL, TRUE);
|
||||||
|
//GetTempPath();
|
||||||
|
strcat(szPath, "\\METIN2\\");
|
||||||
|
|
||||||
|
if (-1 == _access(szPath, 0))
|
||||||
|
if (!CreateDirectory(szPath, NULL))
|
||||||
|
{
|
||||||
|
TraceError("Failed to create directory [%s]\n", szPath);
|
||||||
|
return Py_BuildValue("(is)", FALSE, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf(szPath + strlen(szPath), "%02d%02d_%02d%02d%02d.jpg",
|
||||||
|
tmNow->tm_mon + 1,
|
||||||
|
tmNow->tm_mday,
|
||||||
|
tmNow->tm_hour,
|
||||||
|
tmNow->tm_min,
|
||||||
|
tmNow->tm_sec);
|
||||||
|
|
||||||
|
BOOL bResult = CPythonGraphic::Instance().SaveScreenShot(szPath);
|
||||||
|
return Py_BuildValue("(is)", bResult, szPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetGamma(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float gamma;
|
||||||
|
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &gamma))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonGraphic::Instance().SetGamma(gamma);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetInterfaceRenderState(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().SetInterfaceRenderState();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetGameRenderState(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().SetGameRenderState();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetViewport(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fx;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fx))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fy;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fWidth;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fWidth))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fHeight;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &fHeight))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
UINT uWidth;
|
||||||
|
UINT uHeight;
|
||||||
|
CPythonGraphic::Instance().GetBackBufferSize(&uWidth, &uHeight);
|
||||||
|
CPythonGraphic::Instance().SetViewport(fx*uWidth, fy*uHeight, fWidth*uWidth, fHeight*uHeight);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpRestoreViewport(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().RestoreViewport();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetOmniLight(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonGraphic::Instance().SetOmniLight();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpGetCameraPosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
D3DXVECTOR3 v3Eye = CCameraManager::Instance().GetCurrentCamera()->GetEye();
|
||||||
|
return Py_BuildValue("fff", v3Eye.x, v3Eye.y, v3Eye.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpGetTargetPosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
D3DXVECTOR3 v3Target = CCameraManager::Instance().GetCurrentCamera()->GetTarget();
|
||||||
|
return Py_BuildValue("fff", v3Target.x, v3Target.y, v3Target.z);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initgrp()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "InitScreenEffect", grpInitScreenEffect, METH_VARARGS },
|
||||||
|
{ "Culling", grpCulling, METH_VARARGS },
|
||||||
|
{ "ClearDepthBuffer", grpClearDepthBuffer, METH_VARARGS },
|
||||||
|
{ "Identity", grpIdentity, METH_VARARGS },
|
||||||
|
{ "GenerateColor", grpGenerateColor, METH_VARARGS },
|
||||||
|
{ "PopState", grpPopState, METH_VARARGS },
|
||||||
|
{ "PushState", grpPushState, METH_VARARGS },
|
||||||
|
{ "PushMatrix", grpPushMatrix, METH_VARARGS },
|
||||||
|
{ "PopMatrix", grpPopMatrix, METH_VARARGS },
|
||||||
|
{ "Translate", grpTranslate, METH_VARARGS },
|
||||||
|
{ "Rotate", grpRotate, METH_VARARGS },
|
||||||
|
{ "SetColorRenderState", grpSetColorRenderState, METH_VARARGS },
|
||||||
|
{ "SetAroundCamera", grpSetAroundCamera, METH_VARARGS },
|
||||||
|
{ "SetPositionCamera", grpSetPositionCamera, METH_VARARGS },
|
||||||
|
{ "SetEyeCamera", grpSetEyeCamera, METH_VARARGS },
|
||||||
|
{ "SetPerspective", grpSetPerspective, METH_VARARGS },
|
||||||
|
{ "SetOrtho2d", grpSetOrtho2D, METH_VARARGS },
|
||||||
|
{ "SetOrtho3d", grpSetOrtho3D, METH_VARARGS },
|
||||||
|
{ "SetColor", grpSetColor, METH_VARARGS },
|
||||||
|
{ "SetAlpha", grpSetAlpha, METH_VARARGS },
|
||||||
|
{ "SetDiffuseColor", grpSetDiffuseColor, METH_VARARGS },
|
||||||
|
{ "SetClearColor", grpSetClearColor, METH_VARARGS },
|
||||||
|
{ "GetCursorPosition3d", grpGetCursorPosition3d, METH_VARARGS },
|
||||||
|
{ "SetCursorPosition", grpSetCursorPosition, METH_VARARGS },
|
||||||
|
{ "RenderLine", grpRenderLine, METH_VARARGS },
|
||||||
|
{ "RenderBox", grpRenderBox, METH_VARARGS },
|
||||||
|
{ "RenderRoundBox", grpRenderRoundBox, METH_VARARGS },
|
||||||
|
{ "RenderBox3d", grpRenderBox3d, METH_VARARGS },
|
||||||
|
{ "RenderBar", grpRenderBar, METH_VARARGS },
|
||||||
|
{ "RenderBar3d", grpRenderBar3d, METH_VARARGS },
|
||||||
|
{ "RenderGradationBar", grpRenderGradationBar, METH_VARARGS },
|
||||||
|
{ "RenderCube", grpRenderCube, METH_VARARGS },
|
||||||
|
{ "RenderDownButton", grpRenderDownButton, METH_VARARGS },
|
||||||
|
{ "RenderUpButton", grpRenderUpButton, METH_VARARGS },
|
||||||
|
{ "GetAvailableMemory", grpGetAvailableMemory, METH_VARARGS },
|
||||||
|
{ "SaveScreenShot", grpSaveScreenShot, METH_VARARGS },
|
||||||
|
{ "SaveScreenShotToPath", grpSaveScreenShotToPath, METH_VARARGS },
|
||||||
|
{ "SetGamma", grpSetGamma, METH_VARARGS },
|
||||||
|
{ "SetInterfaceRenderState", grpSetInterfaceRenderState, METH_VARARGS },
|
||||||
|
{ "SetGameRenderState", grpSetGameRenderState, METH_VARARGS },
|
||||||
|
{ "SetViewport", grpSetViewport, METH_VARARGS },
|
||||||
|
{ "RestoreViewport", grpRestoreViewport, METH_VARARGS },
|
||||||
|
{ "SetOmniLight", grpSetOmniLight, METH_VARARGS },
|
||||||
|
{ "GetCameraPosition", grpGetCameraPosition, METH_VARARGS },
|
||||||
|
{ "GetTargetPosition", grpGetTargetPosition, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "CreateTextBar", grpCreateTextBar, METH_VARARGS },
|
||||||
|
{ "CreateBigTextBar", grpCreateBigTextBar, METH_VARARGS },
|
||||||
|
{ "DestroyTextBar", grpDestroyTextBar, METH_VARARGS },
|
||||||
|
{ "RenderTextBar", grpRenderTextBar, METH_VARARGS },
|
||||||
|
{ "TextBarTextOut", grpTextBarTextOut, METH_VARARGS },
|
||||||
|
{ "TextBarSetTextColor", grpTextBarSetTextColor, METH_VARARGS },
|
||||||
|
{ "TextBarGetTextExtent", grpTextBarGetTextExtent, METH_VARARGS },
|
||||||
|
{ "ClearTextBar", grpClearTextBar, METH_VARARGS },
|
||||||
|
{ "SetTextBarClipRect", grpSetTextBarClipRect, METH_VARARGS },
|
||||||
|
|
||||||
|
{ NULL, NULL, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
Py_InitModule("grp", s_methods);
|
||||||
|
}
|
||||||
@@ -0,0 +1,418 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "../common/PortPythonPointer.h" // PORT: preserve Win32 pointer handles on 64-bit hosts
|
||||||
|
|
||||||
|
bool PyTuple_GetTextInstance(PyObject* poArgs, int pos, CGraphicTextInstance** ppTextInstance)
|
||||||
|
{
|
||||||
|
return PyTuple_GetPointer(poArgs, pos, ppTextInstance) && *ppTextInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextGenerate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance * pTextInstance = CGraphicTextInstance::New();
|
||||||
|
return Py_BuildPointer(pTextInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextDestroy(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CGraphicTextInstance::Delete(pTextInstance);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextGetSize(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int width, height;
|
||||||
|
pTextInstance->GetTextSize(&width, &height);
|
||||||
|
return Py_BuildValue("(i, i)", width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetPosition(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int ix;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &ix))
|
||||||
|
return Py_BuildException();
|
||||||
|
int iy;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &iy))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetPosition((float) ix, (float) iy);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetText(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
char* szText;
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szText))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetValue(szText);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetSecret(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
bool bValue;
|
||||||
|
if (!PyTuple_GetBoolean(poArgs, 1, &bValue))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetSecret(bValue);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextOutline(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
bool bValue;
|
||||||
|
if (!PyTuple_GetBoolean(poArgs, 1, &bValue))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetOutline(bValue);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextGetText(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
return Py_BuildValue("s", pTextInstance->GetValueStringReference().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetFontName(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
char* szFontName;
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szFontName))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
std::string stFontName = szFontName;
|
||||||
|
stFontName += ".fnt";
|
||||||
|
|
||||||
|
CResource* pResource = CResourceManager::Instance().GetResourcePointer(stFontName.c_str());
|
||||||
|
pTextInstance->SetTextPointer(static_cast<CGraphicText*>(pResource));
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetFontColor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (2 == PyTuple_Size(poArgs))
|
||||||
|
{
|
||||||
|
int iColor;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iColor))
|
||||||
|
return Py_BuildException();
|
||||||
|
pTextInstance->SetColor(DWORD(iColor));
|
||||||
|
}
|
||||||
|
else if (4 == PyTuple_Size(poArgs))
|
||||||
|
{
|
||||||
|
float fRed;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fRed))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fGreen;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fGreen))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fBlue;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &fBlue))
|
||||||
|
return Py_BuildException();
|
||||||
|
pTextInstance->SetColor(fRed, fGreen, fBlue);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Py_BuildException();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextSetOutLineColor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fRed;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fRed))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fGreen;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fGreen))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fBlue;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &fBlue))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fAlpha;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 4, &fAlpha))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetOutLineColor(fRed, fGreen, fBlue, fAlpha);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject* grpTextRender(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->Render();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextUpdate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->Update();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextShowCursor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->ShowCursor();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextHideCursor(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->HideCursor();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetHorizontalAlign(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iAlign;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iAlign))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetHorizonalAlign(iAlign);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetVerticalAlign(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iAlign;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iAlign))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetVerticalAlign(iAlign);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpSetMax(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iValue;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iValue))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pTextInstance->SetMax(iValue);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpGetSplitingTextLineCount(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char * szText;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szText))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iLineLimitation;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iLineLimitation))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iPosition = 0;
|
||||||
|
int iLineCount = 0;
|
||||||
|
|
||||||
|
for (DWORD i = 0; i < strlen(szText);)
|
||||||
|
{
|
||||||
|
if ('|' == szText[i])
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
|
||||||
|
// 자동 줄 바꿈되고 바로 | 가 있을 경우
|
||||||
|
if (iPosition>0)
|
||||||
|
++iLineCount;
|
||||||
|
|
||||||
|
iPosition = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (szText[i] & 0x80)
|
||||||
|
{
|
||||||
|
i += 2;
|
||||||
|
iPosition += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
iPosition += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iPosition >= iLineLimitation)
|
||||||
|
{
|
||||||
|
++iLineCount;
|
||||||
|
iPosition = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iPosition > 0)
|
||||||
|
++iLineCount;
|
||||||
|
|
||||||
|
return Py_BuildValue("i", iLineCount);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpGetSplitingTextLine(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char * szText;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szText))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iLineLimitation;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iLineLimitation))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iGettingLine;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 2, &iGettingLine))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
std::string strLine = "";
|
||||||
|
int iPosition = 0;
|
||||||
|
int iLineCount = 0;
|
||||||
|
|
||||||
|
// 1차 : 조금 더 깔끔하게 안될까 -_-a
|
||||||
|
// 2차 : 오.. 좀 나아졌다 +_+
|
||||||
|
for (DWORD i = 0; i < strlen(szText);)
|
||||||
|
{
|
||||||
|
if ('|' == szText[i])
|
||||||
|
{
|
||||||
|
i += 1;
|
||||||
|
|
||||||
|
// 자동 줄 바꿈되고 바로 | 가 있을 경우
|
||||||
|
if (iPosition>0)
|
||||||
|
++iLineCount;
|
||||||
|
iPosition = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (szText[i] & 0x80)
|
||||||
|
{
|
||||||
|
if (iLineCount == iGettingLine)
|
||||||
|
strLine.append(szText+i, 2);
|
||||||
|
|
||||||
|
i += 2;
|
||||||
|
iPosition += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (iLineCount == iGettingLine)
|
||||||
|
strLine += szText[i];
|
||||||
|
|
||||||
|
i += 1;
|
||||||
|
iPosition += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (iPosition >= iLineLimitation)
|
||||||
|
{
|
||||||
|
++iLineCount;
|
||||||
|
iPosition = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Py_BuildValue("s", strLine.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpTextPixelPositionToCharacterPosition(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicTextInstance * pTextInstance;
|
||||||
|
if (!PyTuple_GetTextInstance(poArgs, 0, &pTextInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iPixelPosition;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 1, &iPixelPosition))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
int iCharacterPosition = pTextInstance->PixelPositionToCharacterPosition(iPixelPosition);
|
||||||
|
|
||||||
|
return Py_BuildValue("i", iCharacterPosition);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initgrpText()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "Update", grpTextUpdate, METH_VARARGS },
|
||||||
|
{ "Render", grpTextRender, METH_VARARGS },
|
||||||
|
{ "Generate", grpTextGenerate, METH_VARARGS },
|
||||||
|
{ "Destroy", grpTextDestroy, METH_VARARGS },
|
||||||
|
{ "SetFontName", grpTextSetFontName, METH_VARARGS },
|
||||||
|
{ "SetFontColor", grpTextSetFontColor, METH_VARARGS },
|
||||||
|
{ "SetOutLineColor", grpTextSetOutLineColor, METH_VARARGS },
|
||||||
|
{ "SetSecret", grpTextSetSecret, METH_VARARGS },
|
||||||
|
{ "SetOutline", grpTextOutline, METH_VARARGS },
|
||||||
|
{ "SetText", grpTextSetText, METH_VARARGS },
|
||||||
|
{ "GetText", grpTextGetText, METH_VARARGS },
|
||||||
|
{ "GetSize", grpTextGetSize, METH_VARARGS },
|
||||||
|
{ "SetPosition", grpTextSetPosition, METH_VARARGS },
|
||||||
|
{ "ShowCursor", grpTextShowCursor, METH_VARARGS },
|
||||||
|
{ "HideCursor", grpTextHideCursor, METH_VARARGS },
|
||||||
|
{ "SetHorizontalAlign", grpSetHorizontalAlign, METH_VARARGS },
|
||||||
|
{ "SetVerticalAlign", grpSetVerticalAlign, METH_VARARGS },
|
||||||
|
{ "SetMax", grpSetMax, METH_VARARGS },
|
||||||
|
{ "GetSplitingTextLineCount", grpGetSplitingTextLineCount, METH_VARARGS },
|
||||||
|
{ "GetSplitingTextLine", grpGetSplitingTextLine, METH_VARARGS },
|
||||||
|
{ "PixelPositionToCharacterPosition", grpTextPixelPositionToCharacterPosition, METH_VARARGS },
|
||||||
|
{ NULL, NULL, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
Py_InitModule("grpText", s_methods);
|
||||||
|
}
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "../common/PortPythonPointer.h" // PORT: preserve Win32 pointer handles on 64-bit hosts
|
||||||
|
|
||||||
|
bool PyTuple_GetThingInstance(PyObject* poArgs, int pos, CGraphicThingInstance** ppRetThingInstance)
|
||||||
|
{
|
||||||
|
return PyTuple_GetPointer(poArgs, pos, ppRetThingInstance) && *ppRetThingInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpThingGenerate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char * szFileName;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szFileName))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (strlen(szFileName) <= 0)
|
||||||
|
return Py_BuildValue("i", 0);
|
||||||
|
|
||||||
|
CResource* pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
|
||||||
|
|
||||||
|
if (!pResource->IsType(CGraphicThing::Type()))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CGraphicThingInstance * pThingInstance = CGraphicThingInstance::New();
|
||||||
|
pThingInstance->ReserveModelThing(1);
|
||||||
|
pThingInstance->ReserveModelInstance(1);
|
||||||
|
pThingInstance->RegisterModelThing(0, static_cast<CGraphicThing*>(pResource));
|
||||||
|
pThingInstance->SetModelInstance(0, 0, 0);
|
||||||
|
return Py_BuildPointer(pThingInstance);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpThingDelete(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance * pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CGraphicThingInstance::Delete(pThingInstance);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpThingSetFileName(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance * pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
char* szFileName;
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szFileName))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CResource* pResource = CResourceManager::Instance().GetResourcePointer(szFileName);
|
||||||
|
|
||||||
|
if (!pResource->IsType(CGraphicThing::Type()))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->Clear();
|
||||||
|
pThingInstance->ReserveModelThing(1);
|
||||||
|
pThingInstance->ReserveModelInstance(1);
|
||||||
|
pThingInstance->RegisterModelThing(0, static_cast<CGraphicThing*>(pResource));
|
||||||
|
pThingInstance->SetModelInstance(0, 0, 0);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpThingRender(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance* pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->Render();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* grpThingUpdate(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance* pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->Update();
|
||||||
|
pThingInstance->Deform();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetThingPosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance* pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float z;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &z))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->SetPosition(x, y, z);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetThingRotation(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance* pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fDegree;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fDegree))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->SetRotation(fDegree);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * grpSetThingScale(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CGraphicThingInstance* pThingInstance;
|
||||||
|
if (!PyTuple_GetThingInstance(poArgs, 0, &pThingInstance))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float x;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &x))
|
||||||
|
return Py_BuildException();
|
||||||
|
float y;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &y))
|
||||||
|
return Py_BuildException();
|
||||||
|
float z;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 3, &z))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
pThingInstance->SetScale(x, y, z);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
void initgrpThing()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "Update", grpThingUpdate, METH_VARARGS },
|
||||||
|
{ "Render", grpThingRender, METH_VARARGS },
|
||||||
|
{ "SetPosition", grpSetThingPosition, METH_VARARGS },
|
||||||
|
{ "Generate", grpThingGenerate, METH_VARARGS },
|
||||||
|
{ "Delete", grpThingDelete, METH_VARARGS },
|
||||||
|
{ "SetFileName", grpThingSetFileName, METH_VARARGS },
|
||||||
|
{ "SetRotation", grpSetThingRotation, METH_VARARGS },
|
||||||
|
{ "SetScale", grpSetThingScale, METH_VARARGS },
|
||||||
|
{ NULL, NULL, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
Py_InitModule("grpThing", s_methods);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,77 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
|
||||||
|
extern IPythonExceptionSender * g_pkExceptionSender;
|
||||||
|
|
||||||
|
PyObject* dbgLogBox(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char* szMsg;
|
||||||
|
char* szCaption;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szMsg))
|
||||||
|
return Py_BuildException();
|
||||||
|
if (!PyTuple_GetString(poArgs, 1, &szCaption))
|
||||||
|
{
|
||||||
|
LogBox(szMsg);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogBox(szMsg,szCaption);
|
||||||
|
}
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* dbgTrace(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char* szMsg;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szMsg))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
Trace(szMsg);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* dbgTracen(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char* szMsg;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szMsg))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
Tracen(szMsg);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* dbgTraceError(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char* szMsg;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szMsg))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
TraceError( "%s", szMsg );
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* dbgRegisterExceptionString(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
char* szMsg;
|
||||||
|
if (!PyTuple_GetString(poArgs, 0, &szMsg))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
if (g_pkExceptionSender)
|
||||||
|
g_pkExceptionSender->RegisterExceptionString(szMsg);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
void initdbg()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "LogBox", dbgLogBox, METH_VARARGS },
|
||||||
|
{ "Trace", dbgTrace, METH_VARARGS },
|
||||||
|
{ "Tracen", dbgTracen, METH_VARARGS },
|
||||||
|
{ "TraceError", dbgTraceError, METH_VARARGS },
|
||||||
|
{ "RegisterExceptionString", dbgRegisterExceptionString, METH_VARARGS },
|
||||||
|
{ NULL, NULL},
|
||||||
|
};
|
||||||
|
|
||||||
|
Py_InitModule("dbg", s_methods);
|
||||||
|
}
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractSingleton.h"
|
||||||
|
|
||||||
|
class IAbstractApplication : public TAbstractSingleton<IAbstractApplication>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct SCameraPos
|
||||||
|
{
|
||||||
|
float m_fUpDir;
|
||||||
|
float m_fViewDir;
|
||||||
|
float m_fCrossDir;
|
||||||
|
|
||||||
|
SCameraPos() : m_fUpDir(0.0f), m_fViewDir(0.0f), m_fCrossDir(0.0f) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SCameraSetting
|
||||||
|
{
|
||||||
|
D3DXVECTOR3 v3CenterPosition;
|
||||||
|
SCameraPos kCmrPos;
|
||||||
|
float fRotation;
|
||||||
|
float fPitch;
|
||||||
|
float fZoom;
|
||||||
|
|
||||||
|
SCameraSetting() : v3CenterPosition(0.0f, 0.0f, 0.0f),
|
||||||
|
fRotation(0.0f),
|
||||||
|
fPitch(0.0f),
|
||||||
|
fZoom(0.0f) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
IAbstractApplication() {}
|
||||||
|
virtual ~IAbstractApplication() {}
|
||||||
|
|
||||||
|
virtual void GetMousePosition(POINT* ppt) = 0;
|
||||||
|
virtual float GetGlobalTime() = 0;
|
||||||
|
virtual float GetGlobalElapsedTime() = 0;
|
||||||
|
|
||||||
|
virtual void SkipRenderBuffering(DWORD dwSleepMSec) = 0;
|
||||||
|
virtual void SetServerTime(time_t tTime) = 0;
|
||||||
|
virtual void SetCenterPosition(float fx, float fy, float fz) = 0;
|
||||||
|
|
||||||
|
virtual void SetEventCamera(const SCameraSetting & c_rCameraSetting) = 0;
|
||||||
|
virtual void BlendEventCamera(const SCameraSetting & c_rCameraSetting, float fBlendTime) = 0;
|
||||||
|
virtual void SetDefaultCamera() = 0;
|
||||||
|
|
||||||
|
virtual void RunIMEUpdate() = 0;
|
||||||
|
virtual void RunIMETabEvent() = 0;
|
||||||
|
virtual void RunIMEReturnEvent() = 0;
|
||||||
|
|
||||||
|
virtual void RunIMEChangeCodePage() = 0;
|
||||||
|
virtual void RunIMEOpenCandidateListEvent() = 0;
|
||||||
|
virtual void RunIMECloseCandidateListEvent() = 0;
|
||||||
|
virtual void RunIMEOpenReadingWndEvent() = 0;
|
||||||
|
virtual void RunIMECloseReadingWndEvent() = 0;
|
||||||
|
};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractSingleton.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
|
||||||
|
class IAbstractCharacterManager : public TAbstractSingleton<IAbstractCharacterManager>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IAbstractCharacterManager() {}
|
||||||
|
virtual ~IAbstractCharacterManager() {}
|
||||||
|
|
||||||
|
virtual void Destroy() = 0;
|
||||||
|
virtual CInstanceBase * GetInstancePtr(DWORD dwVID) = 0;
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractSingleton.h"
|
||||||
|
|
||||||
|
class IAbstractChat : public TAbstractSingleton<IAbstractChat>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IAbstractChat() {}
|
||||||
|
virtual ~IAbstractChat() {}
|
||||||
|
|
||||||
|
virtual void AppendChat(int iType, const char * c_szChat) = 0;
|
||||||
|
};
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractSingleton.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
|
||||||
|
class IAbstractPlayer : public TAbstractSingleton<IAbstractPlayer>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
IAbstractPlayer() {}
|
||||||
|
virtual ~IAbstractPlayer() {}
|
||||||
|
|
||||||
|
virtual DWORD GetMainCharacterIndex() = 0;
|
||||||
|
virtual void SetMainCharacterIndex(int iIndex) = 0;
|
||||||
|
virtual bool IsMainCharacterIndex(DWORD dwIndex) = 0;
|
||||||
|
|
||||||
|
virtual int GetStatus(DWORD dwType) = 0;
|
||||||
|
|
||||||
|
virtual const char * GetName() = 0;
|
||||||
|
|
||||||
|
virtual void SetRace(DWORD dwRace) = 0;
|
||||||
|
|
||||||
|
virtual void StartStaminaConsume(DWORD dwConsumePerSec, DWORD dwCurrentStamina) = 0;
|
||||||
|
virtual void StopStaminaConsume(DWORD dwCurrentStamina) = 0;
|
||||||
|
|
||||||
|
virtual bool IsPartyMemberByVID(DWORD dwVID) = 0;
|
||||||
|
virtual bool PartyMemberVIDToPID(DWORD dwVID, DWORD * pdwPID) = 0;
|
||||||
|
virtual bool IsSamePartyMember(DWORD dwVID1, DWORD dwVID2) = 0;
|
||||||
|
|
||||||
|
virtual void SetItemData(TItemPos itemPos, const TItemData & c_rkItemInst) = 0;
|
||||||
|
virtual void SetItemCount(TItemPos itemPos, BYTE byCount) = 0;
|
||||||
|
virtual void SetItemMetinSocket(TItemPos itemPos, DWORD dwMetinSocketIndex, DWORD dwMetinNumber) = 0;
|
||||||
|
virtual void SetItemAttribute(TItemPos itemPos, DWORD dwAttrIndex, BYTE byType, short sValue) = 0;
|
||||||
|
#if defined(GAIDEN)
|
||||||
|
virtual void SetItemUnbindTime(DWORD dwItemSlotIndex, DWORD dwUnbindSecondsLeft) = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
virtual DWORD GetItemIndex(TItemPos itemPos) = 0;
|
||||||
|
virtual DWORD GetItemFlags(TItemPos itemPos) = 0;
|
||||||
|
virtual DWORD GetItemCount(TItemPos itemPos) = 0;
|
||||||
|
|
||||||
|
virtual bool IsEquipItemInSlot(TItemPos itemPos) = 0;
|
||||||
|
|
||||||
|
virtual void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition) = 0;
|
||||||
|
virtual void DeleteQuickSlot(int QuickslotIndex) = 0;
|
||||||
|
virtual void MoveQuickSlot(int Source, int Target) = 0;
|
||||||
|
|
||||||
|
virtual void SetWeaponPower(DWORD dwMinPower, DWORD dwMaxPower, DWORD dwMinMagicPower, DWORD dwMaxMagicPower, DWORD dwAddPower) = 0;
|
||||||
|
|
||||||
|
virtual void SetTarget(DWORD dwVID, BOOL bForceChange = TRUE) = 0;
|
||||||
|
virtual void NotifyCharacterUpdate(DWORD dwVID) = 0;
|
||||||
|
virtual void NotifyCharacterDead(DWORD dwVID) = 0;
|
||||||
|
virtual void NotifyDeletingCharacterInstance(DWORD dwVID) = 0;
|
||||||
|
virtual void NotifyChangePKMode() = 0;
|
||||||
|
|
||||||
|
virtual void SetObserverMode(bool isEnable) = 0;
|
||||||
|
virtual void SetMobileFlag(BOOL bFlag) = 0;
|
||||||
|
virtual void SetComboSkillFlag(BOOL bFlag) = 0;
|
||||||
|
|
||||||
|
virtual void StartEmotionProcess() = 0;
|
||||||
|
virtual void EndEmotionProcess() = 0;
|
||||||
|
|
||||||
|
virtual CInstanceBase* NEW_GetMainActorPtr() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
class TAbstractSingleton
|
||||||
|
{
|
||||||
|
static T * ms_singleton;
|
||||||
|
|
||||||
|
public:
|
||||||
|
TAbstractSingleton()
|
||||||
|
{
|
||||||
|
assert(!ms_singleton);
|
||||||
|
// PORT: preserve the derived-subobject adjustment without truncating pointers to Win32 int.
|
||||||
|
ms_singleton = static_cast<T*>(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual ~TAbstractSingleton()
|
||||||
|
{
|
||||||
|
assert(ms_singleton);
|
||||||
|
ms_singleton = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
__forceinline static T & GetSingleton()
|
||||||
|
{
|
||||||
|
assert(ms_singleton!=NULL);
|
||||||
|
return (*ms_singleton);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T> T * TAbstractSingleton <T>::ms_singleton = 0;
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
#pragma once // PORT: 40250's incomplete pragma was harmless under MSVC PCH, but this header is gated twice.
|
||||||
|
|
||||||
|
#include "../EterLib/NetStream.h"
|
||||||
|
#include "../EterLib/FuncObject.h"
|
||||||
|
|
||||||
|
class CAccountConnector : public CNetworkStream, public CSingleton<CAccountConnector>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATE_OFFLINE,
|
||||||
|
STATE_HANDSHAKE,
|
||||||
|
STATE_AUTH,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CAccountConnector();
|
||||||
|
virtual ~CAccountConnector();
|
||||||
|
|
||||||
|
void SetHandler(PyObject* poHandler);
|
||||||
|
void SetLoginInfo(const char * c_szName, const char * c_szPwd);
|
||||||
|
void ClearLoginInfo( void );
|
||||||
|
|
||||||
|
bool SendChinaMatrixCardPacket(const char * c_szMatrixCardString);
|
||||||
|
bool SendRunupMatrixCardPacket(const char * c_szMatrixCardString);
|
||||||
|
bool SendNEWCIBNPasspodAnswerPacket(const char * answer);
|
||||||
|
|
||||||
|
bool Connect(const char * c_szAddr, int iPort, const char * c_szAccountAddr, int iAccountPort);
|
||||||
|
void Disconnect();
|
||||||
|
void Process();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void OnConnectFailure();
|
||||||
|
void OnConnectSuccess();
|
||||||
|
void OnRemoteDisconnect();
|
||||||
|
void OnDisconnect();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Inialize();
|
||||||
|
bool __StateProcess();
|
||||||
|
|
||||||
|
void __OfflineState_Set();
|
||||||
|
void __HandshakeState_Set();
|
||||||
|
void __AuthState_Set();
|
||||||
|
|
||||||
|
bool __HandshakeState_Process();
|
||||||
|
bool __AuthState_Process();
|
||||||
|
|
||||||
|
bool __AuthState_RecvEmpty();
|
||||||
|
bool __AuthState_RecvPhase();
|
||||||
|
bool __AuthState_RecvHandshake();
|
||||||
|
bool __AuthState_RecvPing();
|
||||||
|
bool __AuthState_SendPong();
|
||||||
|
bool __AuthState_RecvAuthSuccess();
|
||||||
|
#ifdef USE_OPENID
|
||||||
|
bool __AuthState_RecvAuthSuccess_OpenID();
|
||||||
|
#endif /* USE_OPENID */
|
||||||
|
bool __AuthState_RecvAuthFailure();
|
||||||
|
bool __AuthState_RecvChinaMatrixCard();
|
||||||
|
bool __AuthState_RecvRunupMatrixQuiz();
|
||||||
|
bool __AuthState_RecvNEWCIBNPasspodRequest();
|
||||||
|
bool __AuthState_RecvPanamaPack();
|
||||||
|
#ifdef _IMPROVED_PACKET_ENCRYPTION_
|
||||||
|
bool __AuthState_RecvKeyAgreement();
|
||||||
|
bool __AuthState_RecvKeyAgreementCompleted();
|
||||||
|
#endif
|
||||||
|
bool __AuthState_RecvHybridCryptKeys(int VarSize);
|
||||||
|
bool __AuthState_RecvHybridCryptSDB(int VarSize);
|
||||||
|
|
||||||
|
bool __AnalyzePacket(UINT uHeader, UINT uPacketSize, bool (CAccountConnector::*pfnDispatchPacket)());
|
||||||
|
// TODO: 지금 현재는 임시다. header뒤에 size 4byte가 무조건 온다는 가정임.
|
||||||
|
// 제대로 하려면 Packet System Refactoring해야 한다.
|
||||||
|
bool __AnalyzeVarSizePacket(UINT uHeader, bool (CAccountConnector::*pfnDispatchPacket)(int));
|
||||||
|
|
||||||
|
#ifndef _IMPROVED_PACKET_ENCRYPTION_
|
||||||
|
void __BuildClientKey();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
protected:
|
||||||
|
UINT m_eState;
|
||||||
|
std::string m_strID;
|
||||||
|
std::string m_strPassword;
|
||||||
|
|
||||||
|
std::string m_strAddr;
|
||||||
|
int m_iPort;
|
||||||
|
BOOL m_isWaitKey;
|
||||||
|
|
||||||
|
PyObject * m_poHandler;
|
||||||
|
|
||||||
|
// CHINA_CRYPT_KEY
|
||||||
|
void __BuildClientKey_20050304Myevan();
|
||||||
|
// END_OF_CHINA_CRYPT_KEY
|
||||||
|
};
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CAffectFlagContainer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
BIT_SIZE = 64,
|
||||||
|
BYTE_SIZE = BIT_SIZE/8+(1*((BIT_SIZE&7) ? 1 : 0)),
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CAffectFlagContainer();
|
||||||
|
~CAffectFlagContainer();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
void CopyInstance(const CAffectFlagContainer& c_rkAffectContainer);
|
||||||
|
void Set(UINT uPos, bool isSet);
|
||||||
|
bool IsSet(UINT uPos) const;
|
||||||
|
|
||||||
|
void CopyData(UINT uPos, UINT uByteSize, const void* c_pvData);
|
||||||
|
|
||||||
|
void ConvertToPosition(unsigned* uRetX, unsigned* uRetY) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
typedef unsigned char Element;
|
||||||
|
|
||||||
|
Element m_aElement[BYTE_SIZE];
|
||||||
|
};
|
||||||
@@ -0,0 +1,360 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "../GameLib/ItemData.h"
|
||||||
|
|
||||||
|
struct SAffects
|
||||||
|
{
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
AFFECT_MAX_NUM = 32,
|
||||||
|
};
|
||||||
|
|
||||||
|
SAffects() : dwAffects(0) {}
|
||||||
|
SAffects(const DWORD & c_rAffects)
|
||||||
|
{
|
||||||
|
__SetAffects(c_rAffects);
|
||||||
|
}
|
||||||
|
int operator = (const DWORD & c_rAffects)
|
||||||
|
{
|
||||||
|
__SetAffects(c_rAffects);
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL IsAffect(BYTE byIndex)
|
||||||
|
{
|
||||||
|
return dwAffects & (1 << byIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void __SetAffects(const DWORD & c_rAffects)
|
||||||
|
{
|
||||||
|
dwAffects = c_rAffects;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD dwAffects;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern std::string g_strGuildSymbolPathName;
|
||||||
|
|
||||||
|
const DWORD c_Name_Max_Length = 64;
|
||||||
|
const DWORD c_FileName_Max_Length = 128;
|
||||||
|
const DWORD c_Short_Name_Max_Length = 32;
|
||||||
|
|
||||||
|
const DWORD c_Inventory_Page_Size = 5*9; // x*y
|
||||||
|
const DWORD c_Inventory_Page_Count = 2;
|
||||||
|
const DWORD c_ItemSlot_Count = c_Inventory_Page_Size * c_Inventory_Page_Count;
|
||||||
|
const DWORD c_Equipment_Count = 12;
|
||||||
|
|
||||||
|
const DWORD c_Equipment_Start = c_ItemSlot_Count;
|
||||||
|
|
||||||
|
const DWORD c_Equipment_Body = c_Equipment_Start + 0;
|
||||||
|
const DWORD c_Equipment_Head = c_Equipment_Start + 1;
|
||||||
|
const DWORD c_Equipment_Shoes = c_Equipment_Start + 2;
|
||||||
|
const DWORD c_Equipment_Wrist = c_Equipment_Start + 3;
|
||||||
|
const DWORD c_Equipment_Weapon = c_Equipment_Start + 4;
|
||||||
|
const DWORD c_Equipment_Neck = c_Equipment_Start + 5;
|
||||||
|
const DWORD c_Equipment_Ear = c_Equipment_Start + 6;
|
||||||
|
const DWORD c_Equipment_Unique1 = c_Equipment_Start + 7;
|
||||||
|
const DWORD c_Equipment_Unique2 = c_Equipment_Start + 8;
|
||||||
|
const DWORD c_Equipment_Arrow = c_Equipment_Start + 9;
|
||||||
|
const DWORD c_Equipment_Shield = c_Equipment_Start + 10;
|
||||||
|
|
||||||
|
// 새로 추가된 신규 반지 & 벨트
|
||||||
|
// 장착형 아이템에 할당할 수 있는 위치가 기존 장비, 채기랍 퀘스트 보상, 코스튬 시스템 등으로 인해서 공간이 잘려있다.
|
||||||
|
// 이게 다 채기랍 보상 버프를 장착아이템처럼 구현한 ㅅㄲ 때문에 난리났따... ㅆㅂ
|
||||||
|
//
|
||||||
|
// 정리하면, 기존 장비창들은 서버DB상 아이템 포지션이 90 ~ 102 이고,
|
||||||
|
// 2013년 초에 새로 추가되는 슬롯들은 111 ~ 부터 시작한다. 착용 장비에서 최대로 사용할 수 있는 값은 121 까지이고, 122부터는 용혼석에서 사용한다.
|
||||||
|
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
|
const DWORD c_New_Equipment_Start = c_Equipment_Start + 21;
|
||||||
|
const DWORD c_New_Equipment_Count = 3;
|
||||||
|
const DWORD c_Equipment_Ring1 = c_New_Equipment_Start + 0;
|
||||||
|
const DWORD c_Equipment_Ring2 = c_New_Equipment_Start + 1;
|
||||||
|
const DWORD c_Equipment_Belt = c_New_Equipment_Start + 2;;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum EDragonSoulDeckType
|
||||||
|
{
|
||||||
|
DS_DECK_1,
|
||||||
|
DS_DECK_2,
|
||||||
|
DS_DECK_MAX_NUM = 2,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EDragonSoulGradeTypes
|
||||||
|
{
|
||||||
|
DRAGON_SOUL_GRADE_NORMAL,
|
||||||
|
DRAGON_SOUL_GRADE_BRILLIANT,
|
||||||
|
DRAGON_SOUL_GRADE_RARE,
|
||||||
|
DRAGON_SOUL_GRADE_ANCIENT,
|
||||||
|
DRAGON_SOUL_GRADE_LEGENDARY,
|
||||||
|
DRAGON_SOUL_GRADE_MAX,
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EDragonSoulStepTypes
|
||||||
|
{
|
||||||
|
DRAGON_SOUL_STEP_LOWEST,
|
||||||
|
DRAGON_SOUL_STEP_LOW,
|
||||||
|
DRAGON_SOUL_STEP_MID,
|
||||||
|
DRAGON_SOUL_STEP_HIGH,
|
||||||
|
DRAGON_SOUL_STEP_HIGHEST,
|
||||||
|
DRAGON_SOUL_STEP_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
#ifdef ENABLE_COSTUME_SYSTEM
|
||||||
|
const DWORD c_Costume_Slot_Start = c_Equipment_Start + 19; // [주의] 숫자(19) 하드코딩 주의. 현재 서버에서 코스츔 슬롯은 19부터임. 서버 common/length.h 파일의 EWearPositions 열거형 참고.
|
||||||
|
const DWORD c_Costume_Slot_Body = c_Costume_Slot_Start + 0;
|
||||||
|
const DWORD c_Costume_Slot_Hair = c_Costume_Slot_Start + 1;
|
||||||
|
const DWORD c_Costume_Slot_Count = 2;
|
||||||
|
const DWORD c_Costume_Slot_End = c_Costume_Slot_Start + c_Costume_Slot_Count;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// [주의] 숫자(32) 하드코딩 주의. 현재 서버에서 용혼석 슬롯은 32부터임.
|
||||||
|
// 서버 common/length.h 파일의 EWearPositions 열거형이 32까지 확장될 것을 염두하고(32 이상은 확장 하기 힘들게 되어있음.),
|
||||||
|
// 그 이후부터를 용혼석 장착 슬롯으로 사용.
|
||||||
|
const DWORD c_Wear_Max = 32;
|
||||||
|
const DWORD c_DragonSoul_Equip_Start = c_ItemSlot_Count + c_Wear_Max;
|
||||||
|
const DWORD c_DragonSoul_Equip_Slot_Max = 6;
|
||||||
|
const DWORD c_DragonSoul_Equip_End = c_DragonSoul_Equip_Start + c_DragonSoul_Equip_Slot_Max * DS_DECK_MAX_NUM;
|
||||||
|
|
||||||
|
// NOTE: 2013년 2월 5일 현재... 용혼석 데크는 2개가 존재하는데, 향후 확장 가능성이 있어서 3개 데크 여유분을 할당 해 둠. 그 뒤 공간은 벨트 인벤토리로 사용
|
||||||
|
const DWORD c_DragonSoul_Equip_Reserved_Count = c_DragonSoul_Equip_Slot_Max * 3;
|
||||||
|
|
||||||
|
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
|
// 벨트 아이템이 제공하는 인벤토리
|
||||||
|
const DWORD c_Belt_Inventory_Slot_Start = c_DragonSoul_Equip_End + c_DragonSoul_Equip_Reserved_Count;
|
||||||
|
const DWORD c_Belt_Inventory_Width = 4;
|
||||||
|
const DWORD c_Belt_Inventory_Height= 4;
|
||||||
|
const DWORD c_Belt_Inventory_Slot_Count = c_Belt_Inventory_Width * c_Belt_Inventory_Height;
|
||||||
|
const DWORD c_Belt_Inventory_Slot_End = c_Belt_Inventory_Slot_Start + c_Belt_Inventory_Slot_Count;
|
||||||
|
|
||||||
|
const DWORD c_Inventory_Count = c_Belt_Inventory_Slot_End;
|
||||||
|
#else
|
||||||
|
const DWORD c_Inventory_Count = c_DragonSoul_Equip_End;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// 용혼석 전용 인벤토리
|
||||||
|
const DWORD c_DragonSoul_Inventory_Start = 0;
|
||||||
|
const DWORD c_DragonSoul_Inventory_Box_Size = 32;
|
||||||
|
const DWORD c_DragonSoul_Inventory_Count = CItemData::DS_SLOT_NUM_TYPES * DRAGON_SOUL_GRADE_MAX * c_DragonSoul_Inventory_Box_Size;
|
||||||
|
const DWORD c_DragonSoul_Inventory_End = c_DragonSoul_Inventory_Start + c_DragonSoul_Inventory_Count;
|
||||||
|
|
||||||
|
enum ESlotType
|
||||||
|
{
|
||||||
|
SLOT_TYPE_NONE,
|
||||||
|
SLOT_TYPE_INVENTORY,
|
||||||
|
SLOT_TYPE_SKILL,
|
||||||
|
SLOT_TYPE_EMOTION,
|
||||||
|
SLOT_TYPE_SHOP,
|
||||||
|
SLOT_TYPE_EXCHANGE_OWNER,
|
||||||
|
SLOT_TYPE_EXCHANGE_TARGET,
|
||||||
|
SLOT_TYPE_QUICK_SLOT,
|
||||||
|
SLOT_TYPE_SAFEBOX,
|
||||||
|
SLOT_TYPE_PRIVATE_SHOP,
|
||||||
|
SLOT_TYPE_MALL,
|
||||||
|
SLOT_TYPE_DRAGON_SOUL_INVENTORY,
|
||||||
|
SLOT_TYPE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EWindows
|
||||||
|
{
|
||||||
|
RESERVED_WINDOW,
|
||||||
|
INVENTORY, // 기본 인벤토리. (45칸 짜리가 2페이지 존재 = 90칸)
|
||||||
|
EQUIPMENT,
|
||||||
|
SAFEBOX,
|
||||||
|
MALL,
|
||||||
|
DRAGON_SOUL_INVENTORY,
|
||||||
|
GROUND, // NOTE: 2013년 2월5일 현재까지 unused.. 왜 있는거지???
|
||||||
|
BELT_INVENTORY, // NOTE: W2.1 버전에 새로 추가되는 벨트 슬롯 아이템이 제공하는 벨트 인벤토리
|
||||||
|
|
||||||
|
WINDOW_TYPE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EDSInventoryMaxNum
|
||||||
|
{
|
||||||
|
DS_INVENTORY_MAX_NUM = c_DragonSoul_Inventory_Count,
|
||||||
|
DS_REFINE_WINDOW_MAX_NUM = 15,
|
||||||
|
};
|
||||||
|
|
||||||
|
#pragma pack (push, 1)
|
||||||
|
#define WORD_MAX 0xffff
|
||||||
|
|
||||||
|
typedef struct SItemPos
|
||||||
|
{
|
||||||
|
BYTE window_type;
|
||||||
|
WORD cell;
|
||||||
|
SItemPos ()
|
||||||
|
{
|
||||||
|
window_type = INVENTORY;
|
||||||
|
cell = WORD_MAX;
|
||||||
|
}
|
||||||
|
SItemPos (BYTE _window_type, WORD _cell)
|
||||||
|
{
|
||||||
|
window_type = _window_type;
|
||||||
|
cell = _cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기존에 cell의 형을 보면 BYTE가 대부분이지만, oi
|
||||||
|
// 어떤 부분은 int, 어떤 부분은 WORD로 되어있어,
|
||||||
|
// 가장 큰 자료형인 int로 받는다.
|
||||||
|
// int operator=(const int _cell)
|
||||||
|
// {
|
||||||
|
//window_type = INVENTORY;
|
||||||
|
// cell = _cell;
|
||||||
|
// return cell;
|
||||||
|
// }
|
||||||
|
bool IsValidCell()
|
||||||
|
{
|
||||||
|
switch (window_type)
|
||||||
|
{
|
||||||
|
case INVENTORY:
|
||||||
|
return cell < c_Inventory_Count;
|
||||||
|
break;
|
||||||
|
case EQUIPMENT:
|
||||||
|
return cell < c_DragonSoul_Equip_End;
|
||||||
|
break;
|
||||||
|
case DRAGON_SOUL_INVENTORY:
|
||||||
|
return cell < (DS_INVENTORY_MAX_NUM);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
bool IsEquipCell()
|
||||||
|
{
|
||||||
|
switch (window_type)
|
||||||
|
{
|
||||||
|
case INVENTORY:
|
||||||
|
case EQUIPMENT:
|
||||||
|
return (c_Equipment_Start + c_Wear_Max > cell) && (c_Equipment_Start <= cell);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case BELT_INVENTORY:
|
||||||
|
case DRAGON_SOUL_INVENTORY:
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
|
bool IsBeltInventoryCell()
|
||||||
|
{
|
||||||
|
bool bResult = c_Belt_Inventory_Slot_Start <= cell && c_Belt_Inventory_Slot_End > cell;
|
||||||
|
return bResult;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool operator==(const struct SItemPos& rhs) const
|
||||||
|
{
|
||||||
|
return (window_type == rhs.window_type) && (cell == rhs.cell);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool operator<(const struct SItemPos& rhs) const
|
||||||
|
{
|
||||||
|
return (window_type < rhs.window_type) || ((window_type == rhs.window_type) && (cell < rhs.cell));
|
||||||
|
}
|
||||||
|
} TItemPos;
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
const DWORD c_QuickBar_Line_Count = 3;
|
||||||
|
const DWORD c_QuickBar_Slot_Count = 12;
|
||||||
|
|
||||||
|
const float c_Idle_WaitTime = 5.0f;
|
||||||
|
|
||||||
|
const int c_Monster_Race_Start_Number = 6;
|
||||||
|
const int c_Monster_Model_Start_Number = 20001;
|
||||||
|
|
||||||
|
const float c_fAttack_Delay_Time = 0.2f;
|
||||||
|
const float c_fHit_Delay_Time = 0.1f;
|
||||||
|
const float c_fCrash_Wave_Time = 0.2f;
|
||||||
|
const float c_fCrash_Wave_Distance = 3.0f;
|
||||||
|
|
||||||
|
const float c_fHeight_Step_Distance = 50.0f;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DISTANCE_TYPE_FOUR_WAY,
|
||||||
|
DISTANCE_TYPE_EIGHT_WAY,
|
||||||
|
DISTANCE_TYPE_ONE_WAY,
|
||||||
|
DISTANCE_TYPE_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
const float c_fMagic_Script_Version = 1.0f;
|
||||||
|
const float c_fSkill_Script_Version = 1.0f;
|
||||||
|
const float c_fMagicSoundInformation_Version = 1.0f;
|
||||||
|
const float c_fBattleCommand_Script_Version = 1.0f;
|
||||||
|
const float c_fEmotionCommand_Script_Version = 1.0f;
|
||||||
|
const float c_fActive_Script_Version = 1.0f;
|
||||||
|
const float c_fPassive_Script_Version = 1.0f;
|
||||||
|
|
||||||
|
// Used by PushMove
|
||||||
|
const float c_fWalkDistance = 175.0f;
|
||||||
|
const float c_fRunDistance = 310.0f;
|
||||||
|
|
||||||
|
#define FILE_MAX_LEN 128
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ITEM_SOCKET_SLOT_MAX_NUM = 3,
|
||||||
|
ITEM_ATTRIBUTE_SLOT_MAX_NUM = 7,
|
||||||
|
};
|
||||||
|
|
||||||
|
#pragma pack(push)
|
||||||
|
#pragma pack(1)
|
||||||
|
|
||||||
|
typedef struct SQuickSlot
|
||||||
|
{
|
||||||
|
BYTE Type;
|
||||||
|
BYTE Position;
|
||||||
|
} TQuickSlot;
|
||||||
|
|
||||||
|
typedef struct TPlayerItemAttribute
|
||||||
|
{
|
||||||
|
BYTE bType;
|
||||||
|
short sValue;
|
||||||
|
} TPlayerItemAttribute;
|
||||||
|
|
||||||
|
typedef struct packet_item
|
||||||
|
{
|
||||||
|
DWORD vnum;
|
||||||
|
BYTE count;
|
||||||
|
DWORD flags;
|
||||||
|
DWORD anti_flags;
|
||||||
|
long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
|
||||||
|
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
|
||||||
|
} TItemData;
|
||||||
|
|
||||||
|
typedef struct packet_shop_item
|
||||||
|
{
|
||||||
|
DWORD vnum;
|
||||||
|
DWORD price;
|
||||||
|
BYTE count;
|
||||||
|
BYTE display_pos;
|
||||||
|
long alSockets[ITEM_SOCKET_SLOT_MAX_NUM];
|
||||||
|
TPlayerItemAttribute aAttr[ITEM_ATTRIBUTE_SLOT_MAX_NUM];
|
||||||
|
} TShopItemData;
|
||||||
|
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
inline float GetSqrtDistance(int ix1, int iy1, int ix2, int iy2) // By sqrt
|
||||||
|
{
|
||||||
|
float dx, dy;
|
||||||
|
|
||||||
|
dx = float(ix1 - ix2);
|
||||||
|
dy = float(iy1 - iy2);
|
||||||
|
|
||||||
|
return sqrtf(dx*dx + dy*dy);
|
||||||
|
}
|
||||||
|
|
||||||
|
// DEFAULT_FONT
|
||||||
|
void DefaultFont_Startup();
|
||||||
|
void DefaultFont_Cleanup();
|
||||||
|
void DefaultFont_SetName(const char * c_szFontName);
|
||||||
|
CResource* DefaultFont_GetResource();
|
||||||
|
CResource* DefaultItalicFont_GetResource();
|
||||||
|
// END_OF_DEFAULT_FONT
|
||||||
|
|
||||||
|
void SetGuildSymbolPath(const char * c_szPathName);
|
||||||
|
const char * GetGuildSymbolFileName(DWORD dwGuildID);
|
||||||
|
BYTE SlotTypeToInvenType(BYTE bSlotType);
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/NetStream.h"
|
||||||
|
#include "MarkManager.h"
|
||||||
|
|
||||||
|
class CGuildMarkDownloader : public CNetworkStream, public CSingleton<CGuildMarkDownloader>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CGuildMarkDownloader();
|
||||||
|
virtual ~CGuildMarkDownloader();
|
||||||
|
|
||||||
|
bool Connect(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey);
|
||||||
|
bool ConnectToRecvSymbol(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey, const std::vector<DWORD> & c_rkVec_dwGuildID);
|
||||||
|
|
||||||
|
void Process();
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATE_OFFLINE,
|
||||||
|
STATE_LOGIN,
|
||||||
|
STATE_COMPLETE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TODO_RECV_NONE,
|
||||||
|
TODO_RECV_MARK,
|
||||||
|
TODO_RECV_SYMBOL,
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
void OnConnectFailure();
|
||||||
|
void OnConnectSuccess();
|
||||||
|
void OnRemoteDisconnect();
|
||||||
|
void OnDisconnect();
|
||||||
|
|
||||||
|
void __Initialize();
|
||||||
|
bool __StateProcess();
|
||||||
|
|
||||||
|
UINT __GetPacketSize(UINT header);
|
||||||
|
bool __DispatchPacket(UINT header);
|
||||||
|
|
||||||
|
void __OfflineState_Set();
|
||||||
|
void __CompleteState_Set();
|
||||||
|
|
||||||
|
void __LoginState_Set();
|
||||||
|
bool __LoginState_Process();
|
||||||
|
bool __LoginState_RecvPhase();
|
||||||
|
bool __LoginState_RecvHandshake();
|
||||||
|
bool __LoginState_RecvPing();
|
||||||
|
bool __LoginState_RecvMarkIndex();
|
||||||
|
bool __LoginState_RecvMarkBlock();
|
||||||
|
bool __LoginState_RecvSymbolData();
|
||||||
|
#ifdef _IMPROVED_PACKET_ENCRYPTION_
|
||||||
|
bool __LoginState_RecvKeyAgreement();
|
||||||
|
bool __LoginState_RecvKeyAgreementCompleted();
|
||||||
|
#endif
|
||||||
|
bool __SendMarkIDXList();
|
||||||
|
bool __SendMarkCRCList();
|
||||||
|
bool __SendSymbolCRCList();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DWORD m_dwHandle;
|
||||||
|
DWORD m_dwRandomKey;
|
||||||
|
DWORD m_dwTodo;
|
||||||
|
|
||||||
|
std::vector<DWORD> m_kVec_dwGuildID;
|
||||||
|
|
||||||
|
UINT m_eState;
|
||||||
|
|
||||||
|
BYTE m_currentRequestingImageIndex;
|
||||||
|
|
||||||
|
CGuildMarkManager * m_pkMarkMgr;
|
||||||
|
|
||||||
|
DWORD m_dwBlockIndex;
|
||||||
|
DWORD m_dwBlockDataSize;
|
||||||
|
DWORD m_dwBlockDataPos;
|
||||||
|
};
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/NetStream.h"
|
||||||
|
#include "MarkImage.h"
|
||||||
|
|
||||||
|
#ifdef __VTUNE__
|
||||||
|
|
||||||
|
class CGuildMarkUploader : public CNetworkStream, public CSingleton<CGuildMarkUploader>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ERROR_NONE,
|
||||||
|
ERROR_CONNECT,
|
||||||
|
ERROR_LOAD,
|
||||||
|
ERROR_WIDTH,
|
||||||
|
ERROR_HEIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CGuildMarkUploader() {}
|
||||||
|
virtual ~CGuildMarkUploader() {}
|
||||||
|
|
||||||
|
void Disconnect() {}
|
||||||
|
bool Connect(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey, DWORD dwGuildID, const char* c_szFileName, UINT* peError) {return false;}
|
||||||
|
bool ConnectToSendSymbol(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey, DWORD dwGuildID, const char* c_szFileName, UINT* peError) {return false;}
|
||||||
|
void Process() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <il/il.h>
|
||||||
|
|
||||||
|
class CGuildMarkUploader : public CNetworkStream, public CSingleton<CGuildMarkUploader>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ERROR_NONE,
|
||||||
|
ERROR_CONNECT,
|
||||||
|
ERROR_LOAD,
|
||||||
|
ERROR_WIDTH,
|
||||||
|
ERROR_HEIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SEND_TYPE_MARK,
|
||||||
|
SEND_TYPE_SYMBOL,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CGuildMarkUploader();
|
||||||
|
virtual ~CGuildMarkUploader();
|
||||||
|
|
||||||
|
void Disconnect();
|
||||||
|
bool Connect(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey, DWORD dwGuildID, const char* c_szFileName, UINT* peError);
|
||||||
|
bool ConnectToSendSymbol(const CNetworkAddress& c_rkNetAddr, DWORD dwHandle, DWORD dwRandomKey, DWORD dwGuildID, const char* c_szFileName, UINT* peError);
|
||||||
|
bool IsCompleteUploading();
|
||||||
|
|
||||||
|
void Process();
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
STATE_OFFLINE,
|
||||||
|
STATE_LOGIN,
|
||||||
|
STATE_COMPLETE,
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
void OnConnectFailure();
|
||||||
|
void OnConnectSuccess();
|
||||||
|
void OnRemoteDisconnect();
|
||||||
|
void OnDisconnect();
|
||||||
|
|
||||||
|
bool __Load(const char* c_szFileName, UINT* peError);
|
||||||
|
bool __LoadSymbol(const char* c_szFileName, UINT* peError);
|
||||||
|
|
||||||
|
bool __Save(const char* c_szFileName);
|
||||||
|
|
||||||
|
void __Inialize();
|
||||||
|
bool __StateProcess();
|
||||||
|
|
||||||
|
void __OfflineState_Set();
|
||||||
|
void __CompleteState_Set();
|
||||||
|
|
||||||
|
void __LoginState_Set();
|
||||||
|
bool __LoginState_Process();
|
||||||
|
bool __LoginState_RecvPhase();
|
||||||
|
bool __LoginState_RecvHandshake();
|
||||||
|
bool __LoginState_RecvPing();
|
||||||
|
#ifdef _IMPROVED_PACKET_ENCRYPTION_
|
||||||
|
bool __LoginState_RecvKeyAgreement();
|
||||||
|
bool __LoginState_RecvKeyAgreementCompleted();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool __AnalyzePacket(UINT uHeader, UINT uPacketSize, bool (CGuildMarkUploader::*pfnDispatchPacket)());
|
||||||
|
|
||||||
|
bool __SendMarkPacket();
|
||||||
|
bool __SendSymbolPacket();
|
||||||
|
|
||||||
|
private:
|
||||||
|
UINT m_eState;
|
||||||
|
|
||||||
|
DWORD m_dwSendType;
|
||||||
|
DWORD m_dwHandle;
|
||||||
|
DWORD m_dwRandomKey;
|
||||||
|
DWORD m_dwGuildID;
|
||||||
|
|
||||||
|
SGuildMark m_kMark;
|
||||||
|
|
||||||
|
DWORD m_dwSymbolBufSize;
|
||||||
|
DWORD m_dwSymbolCRC32;
|
||||||
|
BYTE * m_pbySymbolBuf;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef USE_AHNLAB_HACKSHIELD
|
||||||
|
|
||||||
|
#include "HackshieldLicense.h"
|
||||||
|
|
||||||
|
#ifndef METIN2HS_INCLUDE
|
||||||
|
//#define METIN2HS_INCLUDE hshield-5.4.8.1
|
||||||
|
#define METIN2HS_INCLUDE hackshield //2012년 3월
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define METIN2HS_INCLUDE_HSUPCHK <METIN2HS_INCLUDE/hsupchk.h>
|
||||||
|
#define METIN2HS_INCLUDE_HSUSERUTIL <METIN2HS_INCLUDE/hsuserutil.h>
|
||||||
|
#define METIN2HS_INCLUDE_HSHIELD <METIN2HS_INCLUDE/hshield.h>
|
||||||
|
#define METIN2HS_INCLUDE_HSHIELDLIBLINK <METIN2HS_INCLUDE/hshieldLibLink.h>
|
||||||
|
#define METIN2HS_INCLUDE_ANTICPXSVR <METIN2HS_INCLUDE/AntiCpXSvr.h>
|
||||||
|
|
||||||
|
bool HackShield_Init();
|
||||||
|
bool HackShield_Shutdown();
|
||||||
|
bool HackShield_PollEvent();
|
||||||
|
void HackShield_SetUserInfo(const char* szAccountName);
|
||||||
|
|
||||||
|
#endif /* USE_AHNLAB_HACKSHIELD */
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CInsultChecker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CInsultChecker& GetSingleton();
|
||||||
|
|
||||||
|
public:
|
||||||
|
CInsultChecker();
|
||||||
|
virtual ~CInsultChecker();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
void AppendInsult(const std::string& c_rstInsult);
|
||||||
|
bool IsInsultIn(const char* c_szLine, UINT uLineLen);
|
||||||
|
void FilterInsult(char* szLine, UINT uLineLen);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool __GetInsultLength(const char* c_szWord, UINT* puInsultLen);
|
||||||
|
bool __IsInsult(const char* c_szWord);
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::list<std::string> m_kList_stInsult;
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Locale_inc.h"
|
||||||
|
|
||||||
|
bool LocaleService_IsYMIR();
|
||||||
|
bool LocaleService_IsJAPAN();
|
||||||
|
bool LocaleService_IsENGLISH();
|
||||||
|
bool LocaleService_IsHONGKONG();
|
||||||
|
bool LocaleService_IsTAIWAN();
|
||||||
|
bool LocaleService_IsNEWCIBN();
|
||||||
|
bool LocaleService_IsEUROPE();
|
||||||
|
bool LocaleService_IsWorldEdition();
|
||||||
|
|
||||||
|
unsigned LocaleService_GetCodePage();
|
||||||
|
const char* LocaleService_GetName();
|
||||||
|
const char* LocaleService_GetLocaleName();
|
||||||
|
const char* LocaleService_GetLocalePath();
|
||||||
|
const char* LocaleService_GetSecurityKey();
|
||||||
|
BOOL LocaleService_IsLeadByte( const char chByte );
|
||||||
|
int LocaleService_StringCompareCI( LPCSTR szStringLeft, LPCSTR szStringRight, size_t sizeLength );
|
||||||
|
|
||||||
|
void LocaleService_ForceSetLocale(const char* name, const char* localePath);
|
||||||
|
void LocaleService_LoadConfig(const char* fileName);
|
||||||
|
bool LocaleService_LoadGlobal(HINSTANCE hInstance);
|
||||||
|
unsigned LocaleService_GetLastExp(int level);
|
||||||
|
int LocaleService_GetSkillPower(unsigned level);
|
||||||
|
|
||||||
|
// CHEONMA
|
||||||
|
void LocaleService_SetCHEONMA(bool isEnable);
|
||||||
|
bool LocaleService_IsCHEONMA();
|
||||||
|
// END_OF_CHEONMA
|
||||||
|
|
||||||
|
#ifdef USE_OPENID
|
||||||
|
void LocaleService_SetOpenIDAuthKey(const char *authKey);
|
||||||
|
const char* LocaleService_GetOpenIDAuthKey();
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
#define LOCALE_SERVICE_SINGAPORE // 싱가폴
|
||||||
|
#define ENABLE_COSTUME_SYSTEM
|
||||||
|
#define ENABLE_ENERGY_SYSTEM
|
||||||
|
#define ENABLE_DRAGON_SOUL_SYSTEM
|
||||||
|
#define ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
|
//#define ENABLE_DISCORD_RPC
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
#ifndef __INC_METIN_II_MARKIMAGE_H__
|
||||||
|
#define __INC_METIN_II_MARKIMAGE_H__
|
||||||
|
|
||||||
|
#include <il/il.h> // PORT: normalize the Win32 SDK include case for case-sensitive hosts
|
||||||
|
|
||||||
|
typedef unsigned long Pixel;
|
||||||
|
|
||||||
|
struct SGuildMark
|
||||||
|
{
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
WIDTH = 16,
|
||||||
|
HEIGHT = 12,
|
||||||
|
SIZE = WIDTH * HEIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Pixel m_apxBuf[SIZE]; // 실제 이미지
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
void Clear();
|
||||||
|
bool IsEmpty();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SGuildMarkBlock
|
||||||
|
{
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MARK_PER_BLOCK_WIDTH = 4,
|
||||||
|
MARK_PER_BLOCK_HEIGHT = 4,
|
||||||
|
|
||||||
|
WIDTH = SGuildMark::WIDTH * MARK_PER_BLOCK_WIDTH,
|
||||||
|
HEIGHT = SGuildMark::HEIGHT * MARK_PER_BLOCK_HEIGHT,
|
||||||
|
|
||||||
|
SIZE = WIDTH * HEIGHT,
|
||||||
|
MAX_COMP_SIZE = (SIZE * sizeof(Pixel)) + ((SIZE * sizeof(Pixel)) >> 4) + 64 + 3
|
||||||
|
};
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
Pixel m_apxBuf[SIZE]; // 실제 이미지
|
||||||
|
|
||||||
|
BYTE m_abCompBuf[MAX_COMP_SIZE]; // 압축된 데이터
|
||||||
|
size_t m_sizeCompBuf; // 압축된 크기
|
||||||
|
DWORD m_crc; // 압축된 데이터의 CRC
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
DWORD GetCRC() const;
|
||||||
|
|
||||||
|
void CopyFrom(const BYTE * pbCompBuf, DWORD dwCompSize, DWORD crc);
|
||||||
|
void Compress(const Pixel * pxBuf);
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGuildMarkImage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
WIDTH = 512,
|
||||||
|
HEIGHT = 512,
|
||||||
|
|
||||||
|
BLOCK_ROW_COUNT = HEIGHT / SGuildMarkBlock::HEIGHT, // 10
|
||||||
|
BLOCK_COL_COUNT = WIDTH / SGuildMarkBlock::WIDTH, // 8
|
||||||
|
|
||||||
|
BLOCK_TOTAL_COUNT = BLOCK_ROW_COUNT * BLOCK_COL_COUNT, // 80
|
||||||
|
|
||||||
|
MARK_ROW_COUNT = BLOCK_ROW_COUNT * SGuildMarkBlock::MARK_PER_BLOCK_HEIGHT, // 40
|
||||||
|
MARK_COL_COUNT = BLOCK_COL_COUNT * SGuildMarkBlock::MARK_PER_BLOCK_WIDTH, // 32
|
||||||
|
|
||||||
|
MARK_TOTAL_COUNT = MARK_ROW_COUNT * MARK_COL_COUNT, // 1280
|
||||||
|
|
||||||
|
INVALID_MARK_POSITION = 0xffffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
CGuildMarkImage();
|
||||||
|
virtual ~CGuildMarkImage();
|
||||||
|
|
||||||
|
void Create();
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
bool Build(const char * c_szFileName);
|
||||||
|
bool Save(const char* c_szFileName);
|
||||||
|
bool Load(const char* c_szFileName);
|
||||||
|
|
||||||
|
void PutData(UINT x, UINT y, UINT width, UINT height, void* data);
|
||||||
|
void GetData(UINT x, UINT y, UINT width, UINT height, void* data);
|
||||||
|
|
||||||
|
bool SaveMark(DWORD posMark, BYTE * pbMarkImage);
|
||||||
|
bool DeleteMark(DWORD posMark);
|
||||||
|
bool SaveBlockFromCompressedData(DWORD posBlock, const BYTE * pbComp, DWORD dwCompSize); // 서버 -> 클라이언트
|
||||||
|
|
||||||
|
DWORD GetEmptyPosition(); // 빈 마크 위치를 얻는다.
|
||||||
|
|
||||||
|
void GetBlockCRCList(DWORD * crcList);
|
||||||
|
void GetDiffBlocks(const DWORD * crcList, std::map<BYTE, const SGuildMarkBlock *> & mapDiffBlocks);
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INVALID_HANDLE = 0xffffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
void BuildAllBlocks();
|
||||||
|
|
||||||
|
SGuildMarkBlock m_aakBlock[BLOCK_ROW_COUNT][BLOCK_COL_COUNT];
|
||||||
|
Pixel m_apxImage[WIDTH * HEIGHT * sizeof(Pixel)];
|
||||||
|
|
||||||
|
ILuint m_uImg;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#ifndef __INC_METIN_II_GUILDLIB_MARK_MANAGER_H__
|
||||||
|
#define __INC_METIN_II_GUILDLIB_MARK_MANAGER_H__
|
||||||
|
|
||||||
|
#include "MarkImage.h"
|
||||||
|
|
||||||
|
class CGuildMarkManager : public singleton<CGuildMarkManager>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MAX_IMAGE_COUNT = 5,
|
||||||
|
INVALID_MARK_ID = 0xffffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
// Symbol
|
||||||
|
struct TGuildSymbol
|
||||||
|
{
|
||||||
|
DWORD crc;
|
||||||
|
std::vector<BYTE> raw;
|
||||||
|
};
|
||||||
|
|
||||||
|
CGuildMarkManager();
|
||||||
|
virtual ~CGuildMarkManager();
|
||||||
|
|
||||||
|
const TGuildSymbol * GetGuildSymbol(DWORD GID);
|
||||||
|
bool LoadSymbol(const char* filename);
|
||||||
|
void SaveSymbol(const char* filename);
|
||||||
|
void UploadSymbol(DWORD guildID, int iSize, const BYTE* pbyData);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Mark
|
||||||
|
//
|
||||||
|
void SetMarkPathPrefix(const char * prefix);
|
||||||
|
|
||||||
|
bool LoadMarkIndex(); // 마크 인덱스 불러오기 (서버에서만 사용)
|
||||||
|
bool SaveMarkIndex(); // 마크 인덱스 저장하기
|
||||||
|
|
||||||
|
void LoadMarkImages(); // 모든 마크 이미지를 불러오기
|
||||||
|
void SaveMarkImage(DWORD imgIdx); // 마크 이미지 저장
|
||||||
|
|
||||||
|
bool GetMarkImageFilename(DWORD imgIdx, std::string & path) const;
|
||||||
|
bool AddMarkIDByGuildID(DWORD guildID, DWORD markID);
|
||||||
|
DWORD GetMarkImageCount() const;
|
||||||
|
DWORD GetMarkCount() const;
|
||||||
|
DWORD GetMarkID(DWORD guildID);
|
||||||
|
|
||||||
|
// SERVER
|
||||||
|
void CopyMarkIdx(char * pcBuf) const;
|
||||||
|
DWORD SaveMark(DWORD guildID, BYTE * pbMarkImage);
|
||||||
|
void DeleteMark(DWORD guildID);
|
||||||
|
void GetDiffBlocks(DWORD imgIdx, const DWORD * crcList, std::map<BYTE, const SGuildMarkBlock *> & mapDiffBlocks);
|
||||||
|
|
||||||
|
// CLIENT
|
||||||
|
bool SaveBlockFromCompressedData(DWORD imgIdx, DWORD idBlock, const BYTE * pbBlock, DWORD dwSize);
|
||||||
|
bool GetBlockCRCList(DWORD imgIdx, DWORD * crcList);
|
||||||
|
|
||||||
|
private:
|
||||||
|
//
|
||||||
|
// Mark
|
||||||
|
//
|
||||||
|
CGuildMarkImage * __NewImage();
|
||||||
|
void __DeleteImage(CGuildMarkImage * pkImgDel);
|
||||||
|
|
||||||
|
DWORD __AllocMarkID(DWORD guildID);
|
||||||
|
|
||||||
|
CGuildMarkImage * __GetImage(DWORD imgIdx);
|
||||||
|
CGuildMarkImage * __GetImagePtr(DWORD idMark);
|
||||||
|
|
||||||
|
std::map<DWORD, CGuildMarkImage *> m_mapIdx_Image; // index = image index
|
||||||
|
std::map<DWORD, DWORD> m_mapGID_MarkID; // index = guild id
|
||||||
|
|
||||||
|
std::set<DWORD> m_setFreeMarkID;
|
||||||
|
std::string m_pathPrefix;
|
||||||
|
|
||||||
|
private:
|
||||||
|
//
|
||||||
|
// Symbol
|
||||||
|
//
|
||||||
|
std::map<DWORD, TGuildSymbol> m_mapSymbol;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// 페이드아웃 길이(초)
|
||||||
|
#define MOVIEMAN_FADE_DURATION 1300
|
||||||
|
#define MOVIEMAN_SKIPPABLE_YES true
|
||||||
|
#define MOVIEMAN_POSTEFFECT_FADEOUT 1
|
||||||
|
|
||||||
|
// 동영상 재생에 DX 7.0 사용
|
||||||
|
struct IDirectDraw;
|
||||||
|
struct IDirectDrawSurface;
|
||||||
|
struct IDirectDrawMediaStream;
|
||||||
|
struct IGraphBuilder;
|
||||||
|
struct IBasicAudio;
|
||||||
|
struct IMultiMediaStream;
|
||||||
|
struct IAMMultiMediaStream;
|
||||||
|
|
||||||
|
const GUID CLSID_MP43DMOCodec = { 0xcba9e78b, 0x49a3, 0x49ea, 0x93, 0xd4, 0x6b, 0xcb, 0xa8, 0xc4, 0xde, 0x07 };
|
||||||
|
const GUID CLSID_MP4VideoCodec = { 0x82ccd3e0, 0xf71a, 0x11d0, 0x9f, 0xe5, 0x0, 0x60, 0x97, 0x78, 0xea, 0x66 };
|
||||||
|
const GUID CLSID_MP3AudioCodec = { 0x38be3000, 0xdbf4, 0x11d0, 0x86, 0x0e, 0x0, 0xa0, 0x24, 0xcf, 0xef, 0x6d };
|
||||||
|
const GUID CLSID_DIrectSoundRenderer = { 0x79376820, 0x07D0, 0x11CF, 0xA2, 0x4D, 0x0, 0x20, 0xAF, 0xD7, 0x97, 0x67 };
|
||||||
|
|
||||||
|
class CMovieMan : public CSingleton<CMovieMan>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CMovieMan()
|
||||||
|
: m_movieWidth(0),
|
||||||
|
m_movieHeight(0),
|
||||||
|
m_usingRGB32(false),
|
||||||
|
m_pPrimarySurface(NULL),
|
||||||
|
m_pBasicAudio(NULL)
|
||||||
|
{
|
||||||
|
// PORT: COM initializes only on the 40250 Windows video backend.
|
||||||
|
#ifdef _WIN32
|
||||||
|
CoInitialize(NULL);
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual ~CMovieMan()
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
CoUninitialize();
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
void ClearToBlack();
|
||||||
|
void PlayLogo(const char *pcszName);
|
||||||
|
void PlayIntro();
|
||||||
|
BOOL PlayTutorial(LONG nIdx);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_usingRGB32;
|
||||||
|
int m_movieWidth;
|
||||||
|
int m_movieHeight;
|
||||||
|
RECT m_movieRect;
|
||||||
|
IDirectDrawSurface* m_pPrimarySurface;
|
||||||
|
IBasicAudio* m_pBasicAudio;
|
||||||
|
|
||||||
|
void FillRect(RECT& fillRect, DWORD fillColor);
|
||||||
|
inline void GDIFillRect(RECT& fillRect, DWORD fillColor);
|
||||||
|
inline void GDIBlt(IDirectDrawSurface *pSrcSurface, RECT *pDestRect);
|
||||||
|
|
||||||
|
void GetWindowRect(RECT& windowRect);
|
||||||
|
void CalcMovieRect(int srcWidth, int srcHeight, RECT& movieRect);
|
||||||
|
void CalcBackgroundRect(const RECT& movieRect, RECT& upperRect, RECT& lowerRect);
|
||||||
|
|
||||||
|
BOOL PlayMovie(const char *cpFileName, const bool bSkipAllowed = FALSE, const int nPostEffectID = 0, const DWORD dwPostEffectData = 0);
|
||||||
|
|
||||||
|
HRESULT BuildFilterGraphManually(
|
||||||
|
WCHAR* wpFilename,
|
||||||
|
IAMMultiMediaStream *pAMStream,
|
||||||
|
const GUID FAR clsidSplitter,
|
||||||
|
const GUID FAR clsidVideoCodec,
|
||||||
|
const GUID FAR clsidAudioCodec);
|
||||||
|
|
||||||
|
HRESULT RenderFileToMMStream(const char *cpFilename, IMultiMediaStream **ppMMStream, IDirectDraw *pDD);
|
||||||
|
HRESULT RenderStreamToSurface(IDirectDrawSurface *pSurface, IDirectDrawMediaStream *pDDStream, IMultiMediaStream *pMMStream, bool bSkipAllowed, int nPostEffectID, DWORD dwPostEffectData);
|
||||||
|
HRESULT RenderPostEffectFadeOut(IDirectDrawSurface *pSurface, int fadeOutDuration, DWORD fadeOutColor);
|
||||||
|
|
||||||
|
//#ifdef _DEBUG
|
||||||
|
// HRESULT AddToRot(IGraphBuilder* pGraphBuilder, DWORD *pdwRegister);
|
||||||
|
// void RemoveFromRot(DWORD pdwRegister);
|
||||||
|
//#endif
|
||||||
|
};
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,440 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/MSApplication.h"
|
||||||
|
#include "../EterLib/Input.h"
|
||||||
|
#include "../EterLib/Profiler.h"
|
||||||
|
#include "../EterLib/GrpDevice.h"
|
||||||
|
#include "../EterLib/NetDevice.h"
|
||||||
|
#include "../EterLib/GrpLightManager.h"
|
||||||
|
#include "../EffectLib/EffectManager.h"
|
||||||
|
#include "../GameLib/RaceManager.h"
|
||||||
|
#include "../GameLib/ItemManager.h"
|
||||||
|
#include "../GameLib/FlyingObjectManager.h"
|
||||||
|
#include "../GameLib/GameEventManager.h"
|
||||||
|
#include "../MilesLib/SoundManager.h"
|
||||||
|
|
||||||
|
#include "PythonEventManager.h"
|
||||||
|
#include "PythonPlayer.h"
|
||||||
|
#include "PythonNonPlayer.h"
|
||||||
|
#include "PythonMiniMap.h"
|
||||||
|
#include "PythonIME.h"
|
||||||
|
#include "PythonItem.h"
|
||||||
|
#include "PythonShop.h"
|
||||||
|
#include "PythonExchange.h"
|
||||||
|
#include "PythonChat.h"
|
||||||
|
#include "PythonTextTail.h"
|
||||||
|
#include "PythonSkill.h"
|
||||||
|
#include "PythonSystem.h"
|
||||||
|
//#include "PythonNetworkDatagram.h"
|
||||||
|
#include "PythonNetworkStream.h"
|
||||||
|
#include "PythonCharacterManager.h"
|
||||||
|
#include "PythonQuest.h"
|
||||||
|
#include "PythonMessenger.h"
|
||||||
|
#include "PythonSafeBox.h"
|
||||||
|
#include "PythonGuild.h"
|
||||||
|
|
||||||
|
#include "GuildMarkDownloader.h"
|
||||||
|
#include "GuildMarkUploader.h"
|
||||||
|
|
||||||
|
#include "AccountConnector.h"
|
||||||
|
|
||||||
|
#include "ServerStateChecker.h"
|
||||||
|
#include "AbstractApplication.h"
|
||||||
|
#include "MovieMan.h"
|
||||||
|
|
||||||
|
class CPythonApplication : public CMSApplication, public CInputKeyboard, public IAbstractApplication
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum EDeviceState
|
||||||
|
{
|
||||||
|
DEVICE_STATE_FALSE,
|
||||||
|
DEVICE_STATE_SKIP,
|
||||||
|
DEVICE_STATE_OK,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ECursorMode
|
||||||
|
{
|
||||||
|
CURSOR_MODE_HARDWARE,
|
||||||
|
CURSOR_MODE_SOFTWARE,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ECursorShape
|
||||||
|
{
|
||||||
|
CURSOR_SHAPE_NORMAL,
|
||||||
|
CURSOR_SHAPE_ATTACK,
|
||||||
|
CURSOR_SHAPE_TARGET,
|
||||||
|
CURSOR_SHAPE_TALK,
|
||||||
|
CURSOR_SHAPE_CANT_GO,
|
||||||
|
CURSOR_SHAPE_PICK,
|
||||||
|
|
||||||
|
CURSOR_SHAPE_DOOR,
|
||||||
|
CURSOR_SHAPE_CHAIR,
|
||||||
|
CURSOR_SHAPE_MAGIC, // Magic
|
||||||
|
CURSOR_SHAPE_BUY, // Buy
|
||||||
|
CURSOR_SHAPE_SELL, // Sell
|
||||||
|
|
||||||
|
CURSOR_SHAPE_CAMERA_ROTATE, // Camera Rotate
|
||||||
|
CURSOR_SHAPE_HSIZE, // Horizontal Size
|
||||||
|
CURSOR_SHAPE_VSIZE, // Vertical Size
|
||||||
|
CURSOR_SHAPE_HVSIZE, // Horizontal & Vertical Size
|
||||||
|
|
||||||
|
CURSOR_SHAPE_COUNT,
|
||||||
|
|
||||||
|
// 안정적인 네이밍 변환을 위한 임시 enumerate
|
||||||
|
NORMAL = CURSOR_SHAPE_NORMAL,
|
||||||
|
ATTACK = CURSOR_SHAPE_ATTACK,
|
||||||
|
TARGET = CURSOR_SHAPE_TARGET,
|
||||||
|
CAMERA_ROTATE = CURSOR_SHAPE_CAMERA_ROTATE,
|
||||||
|
CURSOR_COUNT = CURSOR_SHAPE_COUNT,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EInfo
|
||||||
|
{
|
||||||
|
INFO_ACTOR,
|
||||||
|
INFO_EFFECT,
|
||||||
|
INFO_ITEM,
|
||||||
|
INFO_TEXTTAIL,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ECameraControlDirection
|
||||||
|
{
|
||||||
|
CAMERA_TO_POSITIVE = 1,
|
||||||
|
CAMERA_TO_NEGITIVE = -1,
|
||||||
|
CAMERA_STOP = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CAMERA_MODE_NORMAL = 0,
|
||||||
|
CAMERA_MODE_STAND = 1,
|
||||||
|
CAMERA_MODE_BLEND = 2,
|
||||||
|
|
||||||
|
EVENT_CAMERA_NUMBER = 101,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SCameraSpeed
|
||||||
|
{
|
||||||
|
float m_fUpDir;
|
||||||
|
float m_fViewDir;
|
||||||
|
float m_fCrossDir;
|
||||||
|
|
||||||
|
SCameraSpeed() : m_fUpDir(0.0f), m_fViewDir(0.0f), m_fCrossDir(0.0f) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonApplication();
|
||||||
|
virtual ~CPythonApplication();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void ShowWebPage(const char* c_szURL, const RECT& c_rcWebPage);
|
||||||
|
void MoveWebPage(const RECT& c_rcWebPage);
|
||||||
|
void HideWebPage();
|
||||||
|
|
||||||
|
bool IsWebPageMode();
|
||||||
|
|
||||||
|
public:
|
||||||
|
void NotifyHack(const char* c_szFormat, ...);
|
||||||
|
void GetInfo(UINT eInfo, std::string* pstInfo);
|
||||||
|
void GetMousePosition(POINT* ppt);
|
||||||
|
|
||||||
|
static CPythonApplication& Instance()
|
||||||
|
{
|
||||||
|
assert(ms_pInstance != NULL);
|
||||||
|
return *ms_pInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Loop();
|
||||||
|
void Destroy();
|
||||||
|
void Clear();
|
||||||
|
void Exit();
|
||||||
|
void Abort();
|
||||||
|
|
||||||
|
void SetMinFog(float fMinFog);
|
||||||
|
void SetFrameSkip(bool isEnable);
|
||||||
|
void SkipRenderBuffering(DWORD dwSleepMSec);
|
||||||
|
|
||||||
|
bool Create(PyObject* poSelf, const char* c_szName, int width, int height, int Windowed);
|
||||||
|
bool CreateDevice(int width, int height, int Windowed, int bit = 32, int frequency = 0);
|
||||||
|
|
||||||
|
void UpdateGame();
|
||||||
|
void RenderGame();
|
||||||
|
|
||||||
|
bool Process();
|
||||||
|
|
||||||
|
void UpdateClientRect();
|
||||||
|
|
||||||
|
bool CreateCursors();
|
||||||
|
void DestroyCursors();
|
||||||
|
|
||||||
|
void SafeSetCapture();
|
||||||
|
void SafeReleaseCapture();
|
||||||
|
|
||||||
|
BOOL SetCursorNum(int iCursorNum);
|
||||||
|
void SetCursorVisible(BOOL bFlag, bool bLiarCursorOn = false);
|
||||||
|
BOOL GetCursorVisible();
|
||||||
|
bool GetLiarCursorOn();
|
||||||
|
void SetCursorMode(int iMode);
|
||||||
|
int GetCursorMode();
|
||||||
|
int GetCursorNum() { return m_iCursorNum; }
|
||||||
|
|
||||||
|
void SetMouseHandler(PyObject * poMouseHandler);
|
||||||
|
|
||||||
|
int GetWidth();
|
||||||
|
int GetHeight();
|
||||||
|
|
||||||
|
void SetGlobalCenterPosition(LONG x, LONG y);
|
||||||
|
void SetCenterPosition(float fx, float fy, float fz);
|
||||||
|
void GetCenterPosition(TPixelPosition * pPixelPosition);
|
||||||
|
void SetCamera(float Distance, float Pitch, float Rotation, float fDestinationHeight);
|
||||||
|
void GetCamera(float * Distance, float * Pitch, float * Rotation, float * DestinationHeight);
|
||||||
|
void RotateCamera(int iDirection);
|
||||||
|
void PitchCamera(int iDirection);
|
||||||
|
void ZoomCamera(int iDirection);
|
||||||
|
void MovieRotateCamera(int iDirection);
|
||||||
|
void MoviePitchCamera(int iDirection);
|
||||||
|
void MovieZoomCamera(int iDirection);
|
||||||
|
void MovieResetCamera();
|
||||||
|
void SetViewDirCameraSpeed(float fSpeed);
|
||||||
|
void SetCrossDirCameraSpeed(float fSpeed);
|
||||||
|
void SetUpDirCameraSpeed(float fSpeed);
|
||||||
|
float GetRotation();
|
||||||
|
float GetPitch();
|
||||||
|
|
||||||
|
void SetFPS(int iFPS);
|
||||||
|
void SetServerTime(time_t tTime);
|
||||||
|
time_t GetServerTime();
|
||||||
|
time_t GetServerTimeStamp();
|
||||||
|
float GetGlobalTime();
|
||||||
|
float GetGlobalElapsedTime();
|
||||||
|
|
||||||
|
float GetFaceSpeed() { return m_fFaceSpd; }
|
||||||
|
float GetAveRenderTime() { return m_fAveRenderTime; }
|
||||||
|
DWORD GetCurRenderTime() { return m_dwCurRenderTime; }
|
||||||
|
DWORD GetCurUpdateTime() { return m_dwCurUpdateTime; }
|
||||||
|
DWORD GetUpdateFPS() { return m_dwUpdateFPS; }
|
||||||
|
DWORD GetRenderFPS() { return m_dwRenderFPS; }
|
||||||
|
DWORD GetLoad() { return m_dwLoad; }
|
||||||
|
DWORD GetFaceCount() { return m_dwFaceCount; }
|
||||||
|
|
||||||
|
void SetConnectData(const char * c_szIP, int iPort);
|
||||||
|
void GetConnectData(std::string & rstIP, int & riPort);
|
||||||
|
|
||||||
|
void RunIMEUpdate();
|
||||||
|
void RunIMETabEvent();
|
||||||
|
void RunIMEReturnEvent();
|
||||||
|
void RunPressExitKey();
|
||||||
|
|
||||||
|
void RunIMEChangeCodePage();
|
||||||
|
void RunIMEOpenCandidateListEvent();
|
||||||
|
void RunIMECloseCandidateListEvent();
|
||||||
|
void RunIMEOpenReadingWndEvent();
|
||||||
|
void RunIMECloseReadingWndEvent();
|
||||||
|
|
||||||
|
void EnableSpecialCameraMode();
|
||||||
|
void SetCameraSpeed(int iPercentage);
|
||||||
|
|
||||||
|
bool IsLockCurrentCamera();
|
||||||
|
void SetEventCamera(const SCameraSetting & c_rCameraSetting);
|
||||||
|
void BlendEventCamera(const SCameraSetting & c_rCameraSetting, float fBlendTime);
|
||||||
|
void SetDefaultCamera();
|
||||||
|
|
||||||
|
void SetCameraSetting(const SCameraSetting & c_rCameraSetting);
|
||||||
|
void GetCameraSetting(SCameraSetting * pCameraSetting);
|
||||||
|
void SaveCameraSetting(const char * c_szFileName);
|
||||||
|
bool LoadCameraSetting(const char * c_szFileName);
|
||||||
|
|
||||||
|
void SetForceSightRange(int iRange);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
int OnLogoOpen(char* szName);
|
||||||
|
int OnLogoUpdate();
|
||||||
|
void OnLogoRender();
|
||||||
|
void OnLogoClose();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
IGraphBuilder* m_pGraphBuilder; // Graph Builder
|
||||||
|
IBaseFilter* m_pFilterSG; // Sample Grabber 필터
|
||||||
|
ISampleGrabber* m_pSampleGrabber; // 영상 이미지 캡처를 위한 샘플 그래버
|
||||||
|
IMediaControl* m_pMediaCtrl; // Media Control
|
||||||
|
IMediaEventEx* m_pMediaEvent; // Media Event
|
||||||
|
IVideoWindow* m_pVideoWnd; // Video Window
|
||||||
|
IBasicVideo* m_pBasicVideo;
|
||||||
|
BYTE* m_pCaptureBuffer; // 영상 이미지를 캡처한 버퍼
|
||||||
|
LONG m_lBufferSize; // Video 버퍼 크기 변수
|
||||||
|
CGraphicImageTexture* m_pLogoTex; // 출력할 텍스쳐
|
||||||
|
bool m_bLogoError; // 영상 읽기 상태
|
||||||
|
bool m_bLogoPlay;
|
||||||
|
|
||||||
|
int m_nLeft, m_nRight, m_nTop, m_nBottom;
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
LRESULT WindowProcedure(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
void OnCameraUpdate();
|
||||||
|
|
||||||
|
void OnUIUpdate();
|
||||||
|
void OnUIRender();
|
||||||
|
|
||||||
|
void OnMouseUpdate();
|
||||||
|
void OnMouseRender();
|
||||||
|
|
||||||
|
void OnMouseWheel(int nLen);
|
||||||
|
void OnMouseMove(int x, int y);
|
||||||
|
void OnMouseMiddleButtonDown(int x, int y);
|
||||||
|
void OnMouseMiddleButtonUp(int x, int y);
|
||||||
|
void OnMouseLeftButtonDown(int x, int y);
|
||||||
|
void OnMouseLeftButtonUp(int x, int y);
|
||||||
|
void OnMouseLeftButtonDoubleClick(int x, int y);
|
||||||
|
void OnMouseRightButtonDown(int x, int y);
|
||||||
|
void OnMouseRightButtonUp(int x, int y);
|
||||||
|
void OnSizeChange(int width, int height);
|
||||||
|
void OnKeyDown(int iIndex);
|
||||||
|
void OnKeyUp(int iIndex);
|
||||||
|
void OnIMEKeyDown(int iIndex);
|
||||||
|
|
||||||
|
int CheckDeviceState();
|
||||||
|
|
||||||
|
BOOL __IsContinuousChangeTypeCursor(int iCursorNum);
|
||||||
|
|
||||||
|
void __UpdateCamera();
|
||||||
|
|
||||||
|
void __SetFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight, DWORD dwBPP);
|
||||||
|
void __MinimizeFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CTimer m_timer;
|
||||||
|
|
||||||
|
CLightManager m_LightManager;
|
||||||
|
CSoundManager m_SoundManager;
|
||||||
|
CFlyingManager m_FlyingManager;
|
||||||
|
CRaceManager m_RaceManager;
|
||||||
|
CGameEventManager m_GameEventManager;
|
||||||
|
CItemManager m_kItemMgr;
|
||||||
|
CMovieMan m_MovieManager;
|
||||||
|
|
||||||
|
UI::CWindowManager m_kWndMgr;
|
||||||
|
CEffectManager m_kEftMgr;
|
||||||
|
CPythonCharacterManager m_kChrMgr;
|
||||||
|
|
||||||
|
CServerStateChecker m_kServerStateChecker;
|
||||||
|
CPythonGraphic m_pyGraphic;
|
||||||
|
CPythonNetworkStream m_pyNetworkStream;
|
||||||
|
//CPythonNetworkDatagram m_pyNetworkDatagram;
|
||||||
|
CPythonPlayer m_pyPlayer;
|
||||||
|
CPythonIME m_pyIme;
|
||||||
|
CPythonItem m_pyItem;
|
||||||
|
CPythonShop m_pyShop;
|
||||||
|
CPythonExchange m_pyExchange;
|
||||||
|
CPythonChat m_pyChat;
|
||||||
|
CPythonTextTail m_pyTextTail;
|
||||||
|
CPythonNonPlayer m_pyNonPlayer;
|
||||||
|
CPythonMiniMap m_pyMiniMap;
|
||||||
|
CPythonEventManager m_pyEventManager;
|
||||||
|
CPythonBackground m_pyBackground;
|
||||||
|
CPythonSkill m_pySkill;
|
||||||
|
CPythonResource m_pyRes;
|
||||||
|
CPythonQuest m_pyQuest;
|
||||||
|
CPythonMessenger m_pyManager;
|
||||||
|
CPythonSafeBox m_pySafeBox;
|
||||||
|
CPythonGuild m_pyGuild;
|
||||||
|
|
||||||
|
CGuildMarkManager m_kGuildMarkManager;
|
||||||
|
CGuildMarkDownloader m_kGuildMarkDownloader;
|
||||||
|
CGuildMarkUploader m_kGuildMarkUploader;
|
||||||
|
CAccountConnector m_kAccountConnector;
|
||||||
|
|
||||||
|
CGraphicDevice m_grpDevice;
|
||||||
|
CNetworkDevice m_netDevice;
|
||||||
|
|
||||||
|
CPythonSystem m_pySystem;
|
||||||
|
|
||||||
|
|
||||||
|
PyObject * m_poMouseHandler;
|
||||||
|
D3DXVECTOR3 m_v3CenterPosition;
|
||||||
|
|
||||||
|
unsigned int m_iFPS;
|
||||||
|
float m_fAveRenderTime;
|
||||||
|
DWORD m_dwCurRenderTime;
|
||||||
|
DWORD m_dwCurUpdateTime;
|
||||||
|
DWORD m_dwLoad;
|
||||||
|
DWORD m_dwWidth;
|
||||||
|
DWORD m_dwHeight;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Time
|
||||||
|
DWORD m_dwLastIdleTime;
|
||||||
|
DWORD m_dwStartLocalTime;
|
||||||
|
time_t m_tServerTime;
|
||||||
|
time_t m_tLocalStartTime;
|
||||||
|
float m_fGlobalTime;
|
||||||
|
float m_fGlobalElapsedTime;
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////
|
||||||
|
// Camera
|
||||||
|
SCameraSetting m_DefaultCameraSetting;
|
||||||
|
SCameraSetting m_kEventCameraSetting;
|
||||||
|
|
||||||
|
int m_iCameraMode;
|
||||||
|
float m_fBlendCameraStartTime;
|
||||||
|
float m_fBlendCameraBlendTime;
|
||||||
|
SCameraSetting m_kEndBlendCameraSetting;
|
||||||
|
|
||||||
|
float m_fRotationSpeed;
|
||||||
|
float m_fPitchSpeed;
|
||||||
|
float m_fZoomSpeed;
|
||||||
|
float m_fCameraRotateSpeed;
|
||||||
|
float m_fCameraPitchSpeed;
|
||||||
|
float m_fCameraZoomSpeed;
|
||||||
|
|
||||||
|
SCameraPos m_kCmrPos;
|
||||||
|
SCameraSpeed m_kCmrSpd;
|
||||||
|
|
||||||
|
BOOL m_isSpecialCameraMode;
|
||||||
|
// Camera
|
||||||
|
/////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
float m_fFaceSpd;
|
||||||
|
DWORD m_dwFaceSpdSum;
|
||||||
|
DWORD m_dwFaceSpdCount;
|
||||||
|
|
||||||
|
DWORD m_dwFaceAccCount;
|
||||||
|
DWORD m_dwFaceAccTime;
|
||||||
|
|
||||||
|
DWORD m_dwUpdateFPS;
|
||||||
|
DWORD m_dwRenderFPS;
|
||||||
|
DWORD m_dwFaceCount;
|
||||||
|
|
||||||
|
DWORD m_dwLButtonDownTime;
|
||||||
|
DWORD m_dwLButtonUpTime;
|
||||||
|
|
||||||
|
typedef std::map<int, HANDLE> TCursorHandleMap;
|
||||||
|
TCursorHandleMap m_CursorHandleMap;
|
||||||
|
HANDLE m_hCurrentCursor;
|
||||||
|
|
||||||
|
BOOL m_bCursorVisible;
|
||||||
|
bool m_bLiarCursorOn;
|
||||||
|
int m_iCursorMode;
|
||||||
|
bool m_isWindowed;
|
||||||
|
bool m_isFrameSkipDisable;
|
||||||
|
|
||||||
|
// Connect Data
|
||||||
|
std::string m_strIP;
|
||||||
|
int m_iPort;
|
||||||
|
|
||||||
|
static CPythonApplication* ms_pInstance;
|
||||||
|
|
||||||
|
bool m_isMinimizedWnd;
|
||||||
|
bool m_isActivateWnd;
|
||||||
|
BOOL m_isWindowFullScreenEnable;
|
||||||
|
|
||||||
|
DWORD m_dwStickyKeysFlag;
|
||||||
|
DWORD m_dwBufSleepSkipTime;
|
||||||
|
int m_iForceSightRange;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
int m_iCursorNum;
|
||||||
|
int m_iContinuousCursorNum;
|
||||||
|
};
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,183 @@
|
|||||||
|
// PythonBackground.h: interface for the CPythonBackground class.
|
||||||
|
//
|
||||||
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#if !defined(AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_)
|
||||||
|
#define AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_
|
||||||
|
|
||||||
|
#if _MSC_VER > 1000
|
||||||
|
#pragma once
|
||||||
|
#endif // _MSC_VER > 1000
|
||||||
|
|
||||||
|
#include "../GameLib/MapManager.h"
|
||||||
|
#include "../GameLib/TerrainDecal.h"
|
||||||
|
#include "../GameLib/SnowEnvironment.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
|
||||||
|
class CPythonBackground : public CMapManager, public CSingleton<CPythonBackground>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SHADOW_NONE,
|
||||||
|
SHADOW_GROUND,
|
||||||
|
SHADOW_GROUND_AND_SOLO,
|
||||||
|
SHADOW_ALL,
|
||||||
|
SHADOW_ALL_HIGH,
|
||||||
|
SHADOW_ALL_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DISTANCE0,
|
||||||
|
DISTANCE1,
|
||||||
|
DISTANCE2,
|
||||||
|
DISTANCE3,
|
||||||
|
DISTANCE4,
|
||||||
|
NUM_DISTANCE_SET
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DAY_MODE_LIGHT,
|
||||||
|
DAY_MODE_DARK,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SVIEWDISTANCESET
|
||||||
|
{
|
||||||
|
float m_fFogStart;
|
||||||
|
float m_fFogEnd;
|
||||||
|
float m_fFarClip;
|
||||||
|
D3DXVECTOR3 m_v3SkyBoxScale;
|
||||||
|
} TVIEWDISTANCESET;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonBackground();
|
||||||
|
virtual ~CPythonBackground();
|
||||||
|
|
||||||
|
void Initialize();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
void Create();
|
||||||
|
|
||||||
|
void GlobalPositionToLocalPosition(LONG& rGlobalX, LONG& rGlobalY);
|
||||||
|
void LocalPositionToGlobalPosition(LONG& rLocalX, LONG& rLocalY);
|
||||||
|
|
||||||
|
void EnableTerrainOnlyForHeight();
|
||||||
|
bool SetSplatLimit(int iSplatNum);
|
||||||
|
bool SetVisiblePart(int ePart, bool isVisible);
|
||||||
|
bool SetShadowLevel(int eLevel);
|
||||||
|
void RefreshShadowLevel();
|
||||||
|
void SelectViewDistanceNum(int eNum);
|
||||||
|
void SetViewDistanceSet(int eNum, float fFarClip);
|
||||||
|
float GetFarClip();
|
||||||
|
|
||||||
|
DWORD GetRenderShadowTime();
|
||||||
|
void GetDistanceSetInfo(int * peNum, float * pfStart, float * pfEnd, float * pfFarClip);
|
||||||
|
|
||||||
|
bool GetPickingPoint(D3DXVECTOR3 * v3IntersectPt);
|
||||||
|
bool GetPickingPointWithRay(const CRay & rRay, D3DXVECTOR3 * v3IntersectPt);
|
||||||
|
bool GetPickingPointWithRayOnlyTerrain(const CRay & rRay, D3DXVECTOR3 * v3IntersectPt);
|
||||||
|
BOOL GetLightDirection(D3DXVECTOR3 & rv3LightDirection);
|
||||||
|
|
||||||
|
void Update(float fCenterX, float fCenterY, float fCenterZ);
|
||||||
|
|
||||||
|
void CreateCharacterShadowTexture();
|
||||||
|
void ReleaseCharacterShadowTexture();
|
||||||
|
void Render();
|
||||||
|
void RenderSnow();
|
||||||
|
void RenderPCBlocker();
|
||||||
|
void RenderCollision();
|
||||||
|
void RenderCharacterShadowToTexture();
|
||||||
|
void RenderSky();
|
||||||
|
void RenderCloud();
|
||||||
|
void RenderWater();
|
||||||
|
void RenderEffect();
|
||||||
|
void RenderBeforeLensFlare();
|
||||||
|
void RenderAfterLensFlare();
|
||||||
|
|
||||||
|
bool CheckAdvancing(CInstanceBase * pInstance);
|
||||||
|
|
||||||
|
void SetCharacterDirLight();
|
||||||
|
void SetBackgroundDirLight();
|
||||||
|
|
||||||
|
void ChangeToDay();
|
||||||
|
void ChangeToNight();
|
||||||
|
void EnableSnowEnvironment();
|
||||||
|
void DisableSnowEnvironment();
|
||||||
|
void SetXMaxTree(int iGrade);
|
||||||
|
|
||||||
|
void ClearGuildArea();
|
||||||
|
void RegisterGuildArea(int isx, int isy, int iex, int iey);
|
||||||
|
|
||||||
|
void CreateTargetEffect(DWORD dwID, DWORD dwChrVID);
|
||||||
|
void CreateTargetEffect(DWORD dwID, long lx, long ly);
|
||||||
|
void DeleteTargetEffect(DWORD dwID);
|
||||||
|
|
||||||
|
void CreateSpecialEffect(DWORD dwID, float fx, float fy, float fz, const char * c_szFileName);
|
||||||
|
void DeleteSpecialEffect(DWORD dwID);
|
||||||
|
|
||||||
|
void Warp(DWORD dwX, DWORD dwY);
|
||||||
|
|
||||||
|
void VisibleGuildArea();
|
||||||
|
void DisableGuildArea();
|
||||||
|
|
||||||
|
void RegisterDungeonMapName(const char * c_szMapName);
|
||||||
|
TMapInfo* GlobalPositionToMapInfo(DWORD dwGlobalX, DWORD dwGlobalY);
|
||||||
|
const char* GetWarpMapName();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __CreateProperty();
|
||||||
|
bool __IsSame(std::set<int> & rleft, std::set<int> & rright);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
std::string m_strMapName;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CSnowEnvironment m_SnowEnvironment;
|
||||||
|
|
||||||
|
int m_iDayMode;
|
||||||
|
int m_iXMasTreeGrade;
|
||||||
|
|
||||||
|
int m_eShadowLevel;
|
||||||
|
int m_eViewDistanceNum;
|
||||||
|
|
||||||
|
BOOL m_bVisibleGuildArea;
|
||||||
|
|
||||||
|
DWORD m_dwRenderShadowTime;
|
||||||
|
|
||||||
|
DWORD m_dwBaseX;
|
||||||
|
DWORD m_dwBaseY;
|
||||||
|
|
||||||
|
TVIEWDISTANCESET m_ViewDistanceSet[NUM_DISTANCE_SET];
|
||||||
|
|
||||||
|
std::set<int> m_kSet_iShowingPortalID;
|
||||||
|
std::set<std::string> m_kSet_strDungeonMapName;
|
||||||
|
std::map<DWORD, DWORD> m_kMap_dwTargetID_dwChrID;
|
||||||
|
|
||||||
|
struct SReserveTargetEffect
|
||||||
|
{
|
||||||
|
int ilx;
|
||||||
|
int ily;
|
||||||
|
};
|
||||||
|
std::map<DWORD, SReserveTargetEffect> m_kMap_dwID_kReserveTargetEffect;
|
||||||
|
|
||||||
|
struct FFindWarpMapName
|
||||||
|
{
|
||||||
|
DWORD m_dwX, m_dwY;
|
||||||
|
FFindWarpMapName(DWORD dwX, DWORD dwY)
|
||||||
|
{
|
||||||
|
m_dwX = dwX;
|
||||||
|
m_dwY = dwY;
|
||||||
|
}
|
||||||
|
bool operator() (TMapInfo & rMapInfo)
|
||||||
|
{
|
||||||
|
if (m_dwX < rMapInfo.m_dwBaseX || m_dwX >= rMapInfo.m_dwEndX || m_dwY < rMapInfo.m_dwBaseY || m_dwY >= rMapInfo.m_dwEndY)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // !defined(AFX_PYTHONBACKGROUND_H__A202CB18_9553_4CF3_8500_5D7062B55432__INCLUDED_)
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractCharacterManager.h"
|
||||||
|
#include "InstanceBase.h"
|
||||||
|
#include "../GameLib/PhysicsObject.h"
|
||||||
|
|
||||||
|
class CPythonCharacterManager : public CSingleton<CPythonCharacterManager>, public IAbstractCharacterManager, public IObjectManager
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// Character List
|
||||||
|
typedef std::list<CInstanceBase *> TCharacterInstanceList;
|
||||||
|
typedef std::map<DWORD, CInstanceBase *> TCharacterInstanceMap;
|
||||||
|
|
||||||
|
class CharacterIterator;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonCharacterManager();
|
||||||
|
virtual ~CPythonCharacterManager();
|
||||||
|
|
||||||
|
virtual void AdjustCollisionWithOtherObjects(CActorInstance* pInst );
|
||||||
|
|
||||||
|
void EnableSortRendering(bool isEnable);
|
||||||
|
|
||||||
|
bool IsRegisteredVID(DWORD dwVID);
|
||||||
|
bool IsAliveVID(DWORD dwVID);
|
||||||
|
bool IsDeadVID(DWORD dwVID);
|
||||||
|
bool IsCacheMode();
|
||||||
|
|
||||||
|
bool OLD_GetPickedInstanceVID(DWORD* pdwPickedActorID);
|
||||||
|
CInstanceBase* OLD_GetPickedInstancePtr();
|
||||||
|
D3DXVECTOR2& OLD_GetPickedInstPosReference();
|
||||||
|
|
||||||
|
CInstanceBase* FindClickableInstancePtr();
|
||||||
|
|
||||||
|
void InsertPVPKey(DWORD dwVIDSrc, DWORD dwVIDDst);
|
||||||
|
void RemovePVPKey(DWORD dwVIDSrc, DWORD dwVIDDst);
|
||||||
|
void ChangeGVG(DWORD dwSrcGuildID, DWORD dwDstGuildID);
|
||||||
|
|
||||||
|
void GetInfo(std::string* pstInfo);
|
||||||
|
|
||||||
|
void ClearMainInstance();
|
||||||
|
bool SetMainInstance(DWORD dwVID);
|
||||||
|
CInstanceBase* GetMainInstancePtr();
|
||||||
|
|
||||||
|
void SCRIPT_SetAffect(DWORD dwVID, DWORD eAffect, BOOL isVisible);
|
||||||
|
void SetEmoticon(DWORD dwVID, DWORD eEmoticon);
|
||||||
|
bool IsPossibleEmoticon(DWORD dwVID);
|
||||||
|
void ShowPointEffect(DWORD dwVID, DWORD ePoint);
|
||||||
|
bool RegisterPointEffect(DWORD ePoint, const char* c_szFileName);
|
||||||
|
|
||||||
|
// System
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
void DeleteAllInstances();
|
||||||
|
|
||||||
|
bool CreateDeviceObjects();
|
||||||
|
void DestroyDeviceObjects();
|
||||||
|
|
||||||
|
void Update();
|
||||||
|
void Deform();
|
||||||
|
void Render();
|
||||||
|
void RenderShadowMainInstance();
|
||||||
|
void RenderShadowAllInstances();
|
||||||
|
void RenderCollision();
|
||||||
|
|
||||||
|
// Create/Delete Instance
|
||||||
|
CInstanceBase * CreateInstance(const CInstanceBase::SCreateData& c_rkCreateData);
|
||||||
|
CInstanceBase * RegisterInstance(DWORD VirtualID);
|
||||||
|
|
||||||
|
void DeleteInstance(DWORD VirtualID);
|
||||||
|
void DeleteInstanceByFade(DWORD VirtualID);
|
||||||
|
void DeleteVehicleInstance(DWORD VirtualID);
|
||||||
|
|
||||||
|
void DestroyAliveInstanceMap();
|
||||||
|
void DestroyDeadInstanceList();
|
||||||
|
|
||||||
|
inline CharacterIterator CharacterInstanceBegin() { return CharacterIterator(m_kAliveInstMap.begin());}
|
||||||
|
inline CharacterIterator CharacterInstanceEnd() { return CharacterIterator(m_kAliveInstMap.end());}
|
||||||
|
|
||||||
|
// Access Instance
|
||||||
|
void SelectInstance(DWORD VirtualID);
|
||||||
|
CInstanceBase * GetSelectedInstancePtr();
|
||||||
|
|
||||||
|
CInstanceBase * GetInstancePtr(DWORD VirtualID);
|
||||||
|
CInstanceBase * GetInstancePtrByName(const char *name);
|
||||||
|
|
||||||
|
// Pick
|
||||||
|
int PickAll();
|
||||||
|
CInstanceBase * GetCloseInstance(CInstanceBase * pInstance);
|
||||||
|
|
||||||
|
// Refresh TextTail
|
||||||
|
void RefreshAllPCTextTail();
|
||||||
|
void RefreshAllGuildMark();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void UpdateTransform();
|
||||||
|
void UpdateDeleting();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Initialize();
|
||||||
|
|
||||||
|
void __DeleteBlendOutInstance(CInstanceBase* pkInstDel);
|
||||||
|
|
||||||
|
void __OLD_Pick();
|
||||||
|
void __NEW_Pick();
|
||||||
|
|
||||||
|
void __UpdateSortPickedActorList();
|
||||||
|
void __UpdatePickedActorList();
|
||||||
|
void __SortPickedActorList();
|
||||||
|
|
||||||
|
void __RenderSortedAliveActorList();
|
||||||
|
void __RenderSortedDeadActorList();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
CInstanceBase * m_pkInstMain;
|
||||||
|
CInstanceBase * m_pkInstPick;
|
||||||
|
CInstanceBase * m_pkInstBind;
|
||||||
|
D3DXVECTOR2 m_v2PickedInstProjPos;
|
||||||
|
|
||||||
|
TCharacterInstanceMap m_kAliveInstMap;
|
||||||
|
TCharacterInstanceList m_kDeadInstList;
|
||||||
|
|
||||||
|
std::vector<CInstanceBase*> m_kVct_pkInstPicked;
|
||||||
|
|
||||||
|
DWORD m_adwPointEffect[POINT_MAX_NUM];
|
||||||
|
|
||||||
|
public:
|
||||||
|
class CharacterIterator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CharacterIterator(){}
|
||||||
|
CharacterIterator(const TCharacterInstanceMap::iterator & it) : m_it(it) {}
|
||||||
|
|
||||||
|
inline CInstanceBase * operator * () { return m_it->second; }
|
||||||
|
|
||||||
|
inline CharacterIterator & operator ++()
|
||||||
|
{
|
||||||
|
++m_it;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline CharacterIterator operator ++(int)
|
||||||
|
{
|
||||||
|
CharacterIterator new_it = *this;
|
||||||
|
++(*this);
|
||||||
|
return new_it;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline CharacterIterator & operator = (const CharacterIterator & rhs)
|
||||||
|
{
|
||||||
|
m_it = rhs.m_it;
|
||||||
|
return (*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool operator == (const CharacterIterator & rhs) const
|
||||||
|
{
|
||||||
|
return m_it == rhs.m_it;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool operator != (const CharacterIterator & rhs) const
|
||||||
|
{
|
||||||
|
return m_it != rhs.m_it;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
TCharacterInstanceMap::iterator m_it;
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -0,0 +1,234 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Packet.h"
|
||||||
|
#include "AbstractChat.h"
|
||||||
|
|
||||||
|
class CWhisper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct SChatLine
|
||||||
|
{
|
||||||
|
CGraphicTextInstance Instance;
|
||||||
|
|
||||||
|
SChatLine()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
~SChatLine()
|
||||||
|
{
|
||||||
|
Instance.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void DestroySystem();
|
||||||
|
|
||||||
|
static SChatLine* New();
|
||||||
|
static void Delete(SChatLine* pkChatLine);
|
||||||
|
|
||||||
|
static CDynamicPool<SChatLine> ms_kPool;
|
||||||
|
} TChatLine;
|
||||||
|
|
||||||
|
typedef std::deque<TChatLine*> TChatLineDeque;
|
||||||
|
typedef std::list<TChatLine*> TChatLineList;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CWhisper();
|
||||||
|
~CWhisper();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
void SetPosition(float fPosition);
|
||||||
|
void SetBoxSize(float fWidth, float fHeight);
|
||||||
|
void AppendChat(int iType, const char* c_szChat);
|
||||||
|
void Render(float fx, float fy);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Initialize();
|
||||||
|
void __ArrangeChat();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
float m_fLineStep;
|
||||||
|
float m_fWidth;
|
||||||
|
float m_fHeight;
|
||||||
|
float m_fcurPosition;
|
||||||
|
|
||||||
|
TChatLineDeque m_ChatLineDeque;
|
||||||
|
TChatLineList m_ShowingChatLineList;
|
||||||
|
|
||||||
|
public:
|
||||||
|
static void DestroySystem();
|
||||||
|
|
||||||
|
static CWhisper* New();
|
||||||
|
static void Delete(CWhisper* pkWhisper);
|
||||||
|
|
||||||
|
static CDynamicPool<CWhisper> ms_kPool;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CPythonChat : public CSingleton<CPythonChat>, public IAbstractChat
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum EWhisperType
|
||||||
|
{
|
||||||
|
WHISPER_TYPE_CHAT = 0,
|
||||||
|
WHISPER_TYPE_NOT_EXIST = 1,
|
||||||
|
WHISPER_TYPE_TARGET_BLOCKED = 2,
|
||||||
|
WHISPER_TYPE_SENDER_BLOCKED = 3,
|
||||||
|
WHISPER_TYPE_ERROR = 4,
|
||||||
|
WHISPER_TYPE_GM = 5,
|
||||||
|
WHISPER_TYPE_SYSTEM = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EBoardState
|
||||||
|
{
|
||||||
|
BOARD_STATE_VIEW,
|
||||||
|
BOARD_STATE_EDIT,
|
||||||
|
BOARD_STATE_LOG,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CHAT_LINE_MAX_NUM = 300,
|
||||||
|
CHAT_LINE_COLOR_ARRAY_MAX_NUM = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SChatLine
|
||||||
|
{
|
||||||
|
int iType;
|
||||||
|
float fAppendedTime;
|
||||||
|
D3DXCOLOR aColor[CHAT_LINE_COLOR_ARRAY_MAX_NUM];
|
||||||
|
CGraphicTextInstance Instance;
|
||||||
|
|
||||||
|
SChatLine();
|
||||||
|
virtual ~SChatLine();
|
||||||
|
|
||||||
|
void SetColor(DWORD dwID, DWORD dwColor);
|
||||||
|
void SetColorAll(DWORD dwColor);
|
||||||
|
D3DXCOLOR & GetColorRef(DWORD dwID);
|
||||||
|
static void DestroySystem();
|
||||||
|
|
||||||
|
static SChatLine* New();
|
||||||
|
static void Delete(SChatLine* pkChatLine);
|
||||||
|
|
||||||
|
static CDynamicPool<SChatLine> ms_kPool;
|
||||||
|
} TChatLine;
|
||||||
|
|
||||||
|
typedef struct SWaitChat
|
||||||
|
{
|
||||||
|
int iType;
|
||||||
|
std::string strChat;
|
||||||
|
|
||||||
|
DWORD dwAppendingTime;
|
||||||
|
} TWaitChat;
|
||||||
|
|
||||||
|
typedef std::deque<TChatLine*> TChatLineDeque;
|
||||||
|
typedef std::list<TChatLine*> TChatLineList;
|
||||||
|
|
||||||
|
typedef std::map<std::string, CWhisper*> TWhisperMap;
|
||||||
|
typedef std::set<std::string> TIgnoreCharacterSet;
|
||||||
|
typedef std::list<TWaitChat> TWaitChatList;
|
||||||
|
|
||||||
|
typedef struct SChatSet
|
||||||
|
{
|
||||||
|
int m_ix;
|
||||||
|
int m_iy;
|
||||||
|
int m_iHeight;
|
||||||
|
int m_iStep;
|
||||||
|
float m_fEndPos;
|
||||||
|
|
||||||
|
int m_iBoardState;
|
||||||
|
std::vector<int> m_iMode;
|
||||||
|
|
||||||
|
TChatLineList m_ShowingChatLineList;
|
||||||
|
|
||||||
|
bool CheckMode(DWORD dwType)
|
||||||
|
{
|
||||||
|
if (dwType >= m_iMode.size())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return m_iMode[dwType] ? true : false;
|
||||||
|
}
|
||||||
|
|
||||||
|
SChatSet()
|
||||||
|
{
|
||||||
|
m_iBoardState = BOARD_STATE_VIEW;
|
||||||
|
|
||||||
|
m_ix = 0;
|
||||||
|
m_iy = 0;
|
||||||
|
m_fEndPos = 1.0f;
|
||||||
|
m_iHeight = 0;
|
||||||
|
m_iStep = 15;
|
||||||
|
|
||||||
|
m_iMode.clear();
|
||||||
|
m_iMode.resize(ms_iChatModeSize, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ms_iChatModeSize;
|
||||||
|
} TChatSet;
|
||||||
|
|
||||||
|
typedef std::map<int, TChatSet> TChatSetMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonChat();
|
||||||
|
virtual ~CPythonChat();
|
||||||
|
|
||||||
|
void SetChatColor(UINT eType, UINT r, UINT g, UINT b);
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
void Close();
|
||||||
|
|
||||||
|
int CreateChatSet(DWORD dwID);
|
||||||
|
void Update(DWORD dwID);
|
||||||
|
void Render(DWORD dwID);
|
||||||
|
void RenderWhisper(const char * c_szName, float fx, float fy);
|
||||||
|
|
||||||
|
void SetBoardState(DWORD dwID, int iState);
|
||||||
|
void SetPosition(DWORD dwID, int ix, int iy);
|
||||||
|
void SetHeight(DWORD dwID, int iHeight);
|
||||||
|
void SetStep(DWORD dwID, int iStep);
|
||||||
|
void ToggleChatMode(DWORD dwID, int iMode);
|
||||||
|
void EnableChatMode(DWORD dwID, int iMode);
|
||||||
|
void DisableChatMode(DWORD dwID, int iMode);
|
||||||
|
void SetEndPos(DWORD dwID, float fPos);
|
||||||
|
|
||||||
|
int GetVisibleLineCount(DWORD dwID);
|
||||||
|
int GetEditableLineCount(DWORD dwID);
|
||||||
|
int GetLineCount(DWORD dwID);
|
||||||
|
int GetLineStep(DWORD dwID);
|
||||||
|
|
||||||
|
// Chat
|
||||||
|
void AppendChat(int iType, const char * c_szChat);
|
||||||
|
void AppendChatWithDelay(int iType, const char * c_szChat, int iDelay);
|
||||||
|
void ArrangeShowingChat(DWORD dwID);
|
||||||
|
|
||||||
|
// Ignore
|
||||||
|
void IgnoreCharacter(const char * c_szName);
|
||||||
|
BOOL IsIgnoreCharacter(const char * c_szName);
|
||||||
|
|
||||||
|
// Whisper
|
||||||
|
CWhisper * CreateWhisper(const char * c_szName);
|
||||||
|
void AppendWhisper(int iType, const char * c_szName, const char * c_szChat);
|
||||||
|
void ClearWhisper(const char * c_szName);
|
||||||
|
BOOL GetWhisper(const char * c_szName, CWhisper ** ppWhisper);
|
||||||
|
void InitWhisper(PyObject * ppyObject);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Initialize();
|
||||||
|
void __DestroyWhisperMap();
|
||||||
|
|
||||||
|
TChatLineList * GetChatLineListPtr(DWORD dwID);
|
||||||
|
TChatSet * GetChatSetPtr(DWORD dwID);
|
||||||
|
|
||||||
|
void UpdateViewMode(DWORD dwID);
|
||||||
|
void UpdateEditMode(DWORD dwID);
|
||||||
|
void UpdateLogMode(DWORD dwID);
|
||||||
|
|
||||||
|
DWORD GetChatColor(int iType);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TChatLineDeque m_ChatLineDeque;
|
||||||
|
TChatLineList m_ShowingChatLineList;
|
||||||
|
TChatSetMap m_ChatSetMap;
|
||||||
|
TWhisperMap m_WhisperMap;
|
||||||
|
TIgnoreCharacterSet m_IgnoreCharacterSet;
|
||||||
|
TWaitChatList m_WaitChatList;
|
||||||
|
|
||||||
|
D3DXCOLOR m_akD3DXClrChat[CHAT_TYPE_MAX_NUM];
|
||||||
|
};
|
||||||
@@ -0,0 +1,212 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/parser.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
class CPythonEventManager : public CSingleton<CPythonEventManager>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct STextLine
|
||||||
|
{
|
||||||
|
int ixLocal, iyLocal;
|
||||||
|
CGraphicTextInstance * pInstance;
|
||||||
|
} TTextLine;
|
||||||
|
|
||||||
|
typedef std::list<TTextLine> TScriptTextLineList;
|
||||||
|
typedef std::map<int, std::string> TEventAnswerMap;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
EVENT_POSITION_START = 0,
|
||||||
|
EVENT_POSITION_END = 1,
|
||||||
|
|
||||||
|
BOX_VISIBLE_LINE_COUNT = 5,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EButtonType
|
||||||
|
{
|
||||||
|
BUTTON_TYPE_NEXT,
|
||||||
|
BUTTON_TYPE_DONE,
|
||||||
|
BUTTON_TYPE_CANCEL,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EEventType
|
||||||
|
{
|
||||||
|
EVENT_TYPE_LETTER,
|
||||||
|
EVENT_TYPE_COLOR,
|
||||||
|
EVENT_TYPE_DELAY,
|
||||||
|
EVENT_TYPE_ENTER,
|
||||||
|
EVENT_TYPE_WAIT,
|
||||||
|
EVENT_TYPE_CLEAR,
|
||||||
|
EVENT_TYPE_QUESTION,
|
||||||
|
EVENT_TYPE_NEXT,
|
||||||
|
EVENT_TYPE_DONE,
|
||||||
|
|
||||||
|
EVENT_TYPE_LEFT_IMAGE,
|
||||||
|
EVENT_TYPE_TOP_IMAGE,
|
||||||
|
EVENT_TYPE_BACKGROUND_IMAGE,
|
||||||
|
EVENT_TYPE_IMAGE,
|
||||||
|
|
||||||
|
EVENT_TYPE_ADD_MAP_SIGNAL,
|
||||||
|
EVENT_TYPE_CLEAR_MAP_SIGNAL,
|
||||||
|
EVENT_TYPE_SET_MESSAGE_POSITION,
|
||||||
|
EVENT_TYPE_ADJUST_MESSAGE_POSITION,
|
||||||
|
EVENT_TYPE_SET_CENTER_MAP_POSITION,
|
||||||
|
|
||||||
|
EVENT_TYPE_QUEST_BUTTON,
|
||||||
|
|
||||||
|
// HIDE_QUEST_LETTER
|
||||||
|
EVENT_TYPE_QUEST_BUTTON_CLOSE,
|
||||||
|
// END_OF_HIDE_QUEST_LETTER
|
||||||
|
|
||||||
|
EVENT_TYPE_SLEEP,
|
||||||
|
EVENT_TYPE_SET_CAMERA,
|
||||||
|
EVENT_TYPE_BLEND_CAMERA,
|
||||||
|
EVENT_TYPE_RESTORE_CAMERA,
|
||||||
|
EVENT_TYPE_FADE_OUT,
|
||||||
|
EVENT_TYPE_FADE_IN,
|
||||||
|
EVENT_TYPE_WHITE_OUT,
|
||||||
|
EVENT_TYPE_WHITE_IN,
|
||||||
|
EVENT_TYPE_CLEAR_TEXT,
|
||||||
|
EVENT_TYPE_TEXT_HORIZONTAL_ALIGN_CENTER,
|
||||||
|
EVENT_TYPE_TITLE_IMAGE,
|
||||||
|
|
||||||
|
EVENT_TYPE_RUN_CINEMA,
|
||||||
|
EVENT_TYPE_DUNGEON_RESULT,
|
||||||
|
|
||||||
|
EVENT_TYPE_ITEM_NAME,
|
||||||
|
EVENT_TYPE_MONSTER_NAME,
|
||||||
|
|
||||||
|
EVENT_TYPE_COLOR256,
|
||||||
|
EVENT_TYPE_WINDOW_SIZE,
|
||||||
|
|
||||||
|
EVENT_TYPE_INPUT,
|
||||||
|
EVENT_TYPE_CONFIRM_WAIT,
|
||||||
|
EVENT_TYPE_END_CONFIRM_WAIT,
|
||||||
|
|
||||||
|
EVENT_TYPE_INSERT_IMAGE,
|
||||||
|
|
||||||
|
EVENT_TYPE_SELECT_ITEM,
|
||||||
|
};
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<std::string, int> EventTypeMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef struct SEventSet
|
||||||
|
{
|
||||||
|
int ix, iy;
|
||||||
|
int iWidth;
|
||||||
|
int iyLocal;
|
||||||
|
|
||||||
|
// State
|
||||||
|
bool isLock;
|
||||||
|
|
||||||
|
long lLastDelayTime;
|
||||||
|
|
||||||
|
int iCurrentLetter;
|
||||||
|
|
||||||
|
D3DXCOLOR CurrentColor;
|
||||||
|
std::string strCurrentLine;
|
||||||
|
|
||||||
|
CGraphicTextInstance * pCurrentTextLine;
|
||||||
|
TScriptTextLineList ScriptTextLineList;
|
||||||
|
|
||||||
|
BOOL isConfirmWait;
|
||||||
|
CGraphicTextInstance * pConfirmTimeTextLine;
|
||||||
|
int iConfirmEndTime;
|
||||||
|
|
||||||
|
// Group Data
|
||||||
|
script::Group ScriptGroup;
|
||||||
|
|
||||||
|
// Static Data
|
||||||
|
char szFileName[32+1];
|
||||||
|
|
||||||
|
int iVisibleStartLine;
|
||||||
|
int iVisibleLineCount;
|
||||||
|
|
||||||
|
int iAdjustLine;
|
||||||
|
|
||||||
|
D3DXCOLOR DiffuseColor;
|
||||||
|
long lWaitingTime;
|
||||||
|
int iRestrictedCharacterCount;
|
||||||
|
|
||||||
|
int nAnswer;
|
||||||
|
|
||||||
|
bool isTextCenterMode;
|
||||||
|
bool isWaitFlag;
|
||||||
|
|
||||||
|
PyObject * poEventHandler;
|
||||||
|
|
||||||
|
SEventSet() {}
|
||||||
|
virtual ~SEventSet() {}
|
||||||
|
} TEventSet;
|
||||||
|
|
||||||
|
typedef std::vector<TEventSet*> TEventSetVector;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonEventManager();
|
||||||
|
virtual ~CPythonEventManager();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
int RegisterEventSet(const char * c_szFileName);
|
||||||
|
int RegisterEventSetFromString(const std::string& strScript);
|
||||||
|
void ClearEventSeti(int iIndex);
|
||||||
|
void __ClearEventSetp(TEventSet * pEventSet);
|
||||||
|
|
||||||
|
void SetEventHandler(int iIndex, PyObject * poEventHandler);
|
||||||
|
void SetRestrictedCount(int iIndex, int iCount);
|
||||||
|
|
||||||
|
int GetEventSetLocalYPosition(int iIndex);
|
||||||
|
void AddEventSetLocalYPosition(int iIndex, int iAddValue);
|
||||||
|
void InsertText(int iIndex, const char * c_szText, int iX_pos = 0);
|
||||||
|
|
||||||
|
void UpdateEventSet(int iIndex, int ix, int iy);
|
||||||
|
void RenderEventSet(int iIndex);
|
||||||
|
void SetEventSetWidth(int iIndex, int iWidth);
|
||||||
|
|
||||||
|
void Skip(int iIndex);
|
||||||
|
bool IsWait(int iIndex);
|
||||||
|
void EndEventProcess(int iIndex);
|
||||||
|
|
||||||
|
void SelectAnswer(int iIndex, int iAnswer);
|
||||||
|
void SetVisibleStartLine(int iIndex, int iStartLine);
|
||||||
|
int GetVisibleStartLine(int iIndex);
|
||||||
|
int GetLineCount(int iIndex);
|
||||||
|
void SetVisibleLineCount(int iIndex, int iLineCount);
|
||||||
|
|
||||||
|
void SetInterfaceWindow(PyObject * poInterface);
|
||||||
|
void SetLeftTimeString(const char * c_szString);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __InitEventSet(TEventSet& rEventSet);
|
||||||
|
void __InsertLine(TEventSet& rEventSet, BOOL isCenter=FALSE, int iX_pos=0);
|
||||||
|
void __AddSpace(TEventSet& pEventSet, int iSpace);
|
||||||
|
|
||||||
|
DWORD GetEmptyEventSetSlot();
|
||||||
|
|
||||||
|
bool CheckEventSetIndex(int iIndex);
|
||||||
|
|
||||||
|
void ProcessEventSet(TEventSet * pEventSet);
|
||||||
|
|
||||||
|
void ClearLine(TEventSet * pEventSet);
|
||||||
|
void RefreshLinePosition(TEventSet * pEventSet);
|
||||||
|
bool GetScriptEventIndex(const char * c_szName, int * pEventPosition, int * pEventType);
|
||||||
|
|
||||||
|
void MakeQuestion(TEventSet * pEventSet, script::TArgList & rArgumentList);
|
||||||
|
void MakeNextButton(TEventSet * pEventSet, int iButtonType);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TEventSetVector m_EventSetVector;
|
||||||
|
BOOL m_isQuestConfirmWait;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CDynamicPool<TEventSet> m_EventSetPool;
|
||||||
|
CDynamicPool<CGraphicTextInstance> m_ScriptTextLinePool;
|
||||||
|
PyObject * m_poInterface;
|
||||||
|
std::string m_strLeftTimeString;
|
||||||
|
};
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Packet.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 교환 창 관련
|
||||||
|
*/
|
||||||
|
class CPythonExchange : public CSingleton<CPythonExchange>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
EXCHANGE_ITEM_MAX_NUM = 12,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct trade
|
||||||
|
{
|
||||||
|
char name[CHARACTER_NAME_MAX_LEN + 1];
|
||||||
|
|
||||||
|
DWORD item_vnum[EXCHANGE_ITEM_MAX_NUM];
|
||||||
|
BYTE item_count[EXCHANGE_ITEM_MAX_NUM];
|
||||||
|
DWORD item_metin[EXCHANGE_ITEM_MAX_NUM][ITEM_SOCKET_SLOT_MAX_NUM];
|
||||||
|
TPlayerItemAttribute item_attr[EXCHANGE_ITEM_MAX_NUM][ITEM_ATTRIBUTE_SLOT_MAX_NUM];
|
||||||
|
|
||||||
|
BYTE accept;
|
||||||
|
DWORD elk;
|
||||||
|
} TExchangeData;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonExchange();
|
||||||
|
virtual ~CPythonExchange();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
void Start();
|
||||||
|
void End();
|
||||||
|
bool isTrading();
|
||||||
|
|
||||||
|
// Interface
|
||||||
|
|
||||||
|
void SetSelfName(const char *name);
|
||||||
|
void SetTargetName(const char *name);
|
||||||
|
|
||||||
|
char *GetNameFromSelf();
|
||||||
|
char *GetNameFromTarget();
|
||||||
|
|
||||||
|
void SetElkToTarget(DWORD elk);
|
||||||
|
void SetElkToSelf(DWORD elk);
|
||||||
|
|
||||||
|
DWORD GetElkFromTarget();
|
||||||
|
DWORD GetElkFromSelf();
|
||||||
|
|
||||||
|
void SetItemToTarget(DWORD pos, DWORD vnum, BYTE count);
|
||||||
|
void SetItemToSelf(DWORD pos, DWORD vnum, BYTE count);
|
||||||
|
|
||||||
|
void SetItemMetinSocketToTarget(int pos, int imetinpos, DWORD vnum);
|
||||||
|
void SetItemMetinSocketToSelf(int pos, int imetinpos, DWORD vnum);
|
||||||
|
|
||||||
|
void SetItemAttributeToTarget(int pos, int iattrpos, BYTE byType, short sValue);
|
||||||
|
void SetItemAttributeToSelf(int pos, int iattrpos, BYTE byType, short sValue);
|
||||||
|
|
||||||
|
void DelItemOfTarget(BYTE pos);
|
||||||
|
void DelItemOfSelf(BYTE pos);
|
||||||
|
|
||||||
|
DWORD GetItemVnumFromTarget(BYTE pos);
|
||||||
|
DWORD GetItemVnumFromSelf(BYTE pos);
|
||||||
|
|
||||||
|
BYTE GetItemCountFromTarget(BYTE pos);
|
||||||
|
BYTE GetItemCountFromSelf(BYTE pos);
|
||||||
|
|
||||||
|
DWORD GetItemMetinSocketFromTarget(BYTE pos, int iMetinSocketPos);
|
||||||
|
DWORD GetItemMetinSocketFromSelf(BYTE pos, int iMetinSocketPos);
|
||||||
|
|
||||||
|
void GetItemAttributeFromTarget(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||||
|
void GetItemAttributeFromSelf(BYTE pos, int iAttrPos, BYTE * pbyType, short * psValue);
|
||||||
|
|
||||||
|
void SetAcceptToTarget(BYTE Accept);
|
||||||
|
void SetAcceptToSelf(BYTE Accept);
|
||||||
|
|
||||||
|
bool GetAcceptFromTarget();
|
||||||
|
bool GetAcceptFromSelf();
|
||||||
|
|
||||||
|
bool GetElkMode();
|
||||||
|
void SetElkMode(bool value);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool m_isTrading;
|
||||||
|
|
||||||
|
bool m_elk_mode; // 엘크를 클릭해서 교환했을때를 위한 변종임.
|
||||||
|
TExchangeData m_self;
|
||||||
|
TExchangeData m_victim;
|
||||||
|
};
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Packet.h"
|
||||||
|
|
||||||
|
class CPythonGuild : public CSingleton<CPythonGuild>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
GUILD_SKILL_MAX_NUM = 12,
|
||||||
|
ENEMY_GUILD_SLOT_MAX_COUNT = 6,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SGulidInfo
|
||||||
|
{
|
||||||
|
DWORD dwGuildID;
|
||||||
|
char szGuildName[GUILD_NAME_MAX_LEN+1];
|
||||||
|
DWORD dwMasterPID;
|
||||||
|
DWORD dwGuildLevel;
|
||||||
|
DWORD dwCurrentExperience;
|
||||||
|
DWORD dwCurrentMemberCount;
|
||||||
|
DWORD dwMaxMemberCount;
|
||||||
|
DWORD dwGuildMoney;
|
||||||
|
BOOL bHasLand;
|
||||||
|
} TGuildInfo;
|
||||||
|
|
||||||
|
typedef struct SGuildGradeData
|
||||||
|
{
|
||||||
|
SGuildGradeData(){}
|
||||||
|
SGuildGradeData(BYTE byAuthorityFlag_, const char * c_szName_) : byAuthorityFlag(byAuthorityFlag_), strName(c_szName_) {}
|
||||||
|
BYTE byAuthorityFlag;
|
||||||
|
std::string strName;
|
||||||
|
} TGuildGradeData;
|
||||||
|
typedef std::map<BYTE, TGuildGradeData> TGradeDataMap;
|
||||||
|
|
||||||
|
typedef struct SGuildMemberData
|
||||||
|
{
|
||||||
|
DWORD dwPID;
|
||||||
|
|
||||||
|
std::string strName;
|
||||||
|
BYTE byGrade;
|
||||||
|
BYTE byJob;
|
||||||
|
BYTE byLevel;
|
||||||
|
BYTE byGeneralFlag;
|
||||||
|
DWORD dwOffer;
|
||||||
|
} TGuildMemberData;
|
||||||
|
typedef std::vector<TGuildMemberData> TGuildMemberDataVector;
|
||||||
|
|
||||||
|
typedef struct SGuildBoardCommentData
|
||||||
|
{
|
||||||
|
DWORD dwCommentID;
|
||||||
|
std::string strName;
|
||||||
|
std::string strComment;
|
||||||
|
} TGuildBoardCommentData;
|
||||||
|
typedef std::vector<TGuildBoardCommentData> TGuildBoardCommentDataVector;
|
||||||
|
|
||||||
|
typedef struct SGuildSkillData
|
||||||
|
{
|
||||||
|
BYTE bySkillPoint;
|
||||||
|
BYTE bySkillLevel[GUILD_SKILL_MAX_NUM];
|
||||||
|
WORD wGuildPoint;
|
||||||
|
WORD wMaxGuildPoint;
|
||||||
|
} TGuildSkillData;
|
||||||
|
|
||||||
|
typedef std::map<DWORD, std::string> TGuildNameMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonGuild();
|
||||||
|
virtual ~CPythonGuild();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
void EnableGuild();
|
||||||
|
void SetGuildMoney(DWORD dwMoney);
|
||||||
|
void SetGuildEXP(BYTE byLevel, DWORD dwEXP);
|
||||||
|
void SetGradeData(BYTE byGradeNumber, TGuildGradeData & rGuildGradeData);
|
||||||
|
void SetGradeName(BYTE byGradeNumber, const char * c_szName);
|
||||||
|
void SetGradeAuthority(BYTE byGradeNumber, BYTE byAuthority);
|
||||||
|
void ClearComment();
|
||||||
|
void RegisterComment(DWORD dwCommentID, const char * c_szName, const char * c_szComment);
|
||||||
|
void RegisterMember(TGuildMemberData & rGuildMemberData);
|
||||||
|
void ChangeGuildMemberGrade(DWORD dwPID, BYTE byGrade);
|
||||||
|
void ChangeGuildMemberGeneralFlag(DWORD dwPID, BYTE byFlag);
|
||||||
|
void RemoveMember(DWORD dwPID);
|
||||||
|
void RegisterGuildName(DWORD dwID, const char * c_szName);
|
||||||
|
|
||||||
|
BOOL IsMainPlayer(DWORD dwPID);
|
||||||
|
BOOL IsGuildEnable();
|
||||||
|
TGuildInfo & GetGuildInfoRef();
|
||||||
|
BOOL GetGradeDataPtr(DWORD dwGradeNumber, TGuildGradeData ** ppData);
|
||||||
|
const TGuildBoardCommentDataVector & GetGuildBoardCommentVector();
|
||||||
|
DWORD GetMemberCount();
|
||||||
|
BOOL GetMemberDataPtr(DWORD dwIndex, TGuildMemberData ** ppData);
|
||||||
|
BOOL GetMemberDataPtrByPID(DWORD dwPID, TGuildMemberData ** ppData);
|
||||||
|
BOOL GetMemberDataPtrByName(const char * c_szName, TGuildMemberData ** ppData);
|
||||||
|
DWORD GetGuildMemberLevelSummary();
|
||||||
|
DWORD GetGuildMemberLevelAverage();
|
||||||
|
DWORD GetGuildExperienceSummary();
|
||||||
|
TGuildSkillData & GetGuildSkillDataRef();
|
||||||
|
bool GetGuildName(DWORD dwID, std::string * pstrGuildName);
|
||||||
|
DWORD GetGuildID();
|
||||||
|
BOOL HasGuildLand();
|
||||||
|
|
||||||
|
void StartGuildWar(DWORD dwEnemyGuildID);
|
||||||
|
void EndGuildWar(DWORD dwEnemyGuildID);
|
||||||
|
DWORD GetEnemyGuildID(DWORD dwIndex);
|
||||||
|
BOOL IsDoingGuildWar();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __CalculateLevelAverage();
|
||||||
|
void __SortMember();
|
||||||
|
BOOL __IsGradeData(BYTE byGradeNumber);
|
||||||
|
|
||||||
|
void __Initialize();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TGuildInfo m_GuildInfo;
|
||||||
|
TGradeDataMap m_GradeDataMap;
|
||||||
|
TGuildMemberDataVector m_GuildMemberDataVector;
|
||||||
|
TGuildBoardCommentDataVector m_GuildBoardCommentVector;
|
||||||
|
TGuildSkillData m_GuildSkillData;
|
||||||
|
TGuildNameMap m_GuildNameMap;
|
||||||
|
DWORD m_adwEnemyGuildID[ENEMY_GUILD_SLOT_MAX_COUNT];
|
||||||
|
|
||||||
|
DWORD m_dwMemberLevelSummary;
|
||||||
|
DWORD m_dwMemberLevelAverage;
|
||||||
|
DWORD m_dwMemberExperienceSummary;
|
||||||
|
|
||||||
|
BOOL m_bGuildEnable;
|
||||||
|
};
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterBase/Singleton.h"
|
||||||
|
#include "../EterLib/IME.h"
|
||||||
|
|
||||||
|
class CPythonIME :
|
||||||
|
public IIMEEventSink,
|
||||||
|
public CIME,
|
||||||
|
public CSingleton<CPythonIME>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CPythonIME();
|
||||||
|
virtual ~CPythonIME();
|
||||||
|
|
||||||
|
void MoveLeft();
|
||||||
|
void MoveRight();
|
||||||
|
void MoveHome();
|
||||||
|
void MoveEnd();
|
||||||
|
void SetCursorPosition(int iPosition);
|
||||||
|
void Delete();
|
||||||
|
|
||||||
|
void Create(HWND hWnd);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void OnTab();
|
||||||
|
virtual void OnReturn();
|
||||||
|
virtual void OnEscape();
|
||||||
|
|
||||||
|
virtual bool OnWM_CHAR( WPARAM wParam, LPARAM lParam );
|
||||||
|
virtual void OnUpdate();
|
||||||
|
virtual void OnChangeCodePage();
|
||||||
|
virtual void OnOpenCandidateList();
|
||||||
|
virtual void OnCloseCandidateList();
|
||||||
|
virtual void OnOpenReadingWnd();
|
||||||
|
virtual void OnCloseReadingWnd();
|
||||||
|
};
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// Note : 화면상에 떨어진 Item의 Update와 Rendering을 책임지는 한편
|
||||||
|
// 각 아이템의 데이타와 Icon Image Instance의 매니져 역할까지 주관
|
||||||
|
// 조금 난잡해진거 같기도 하다 - 2003. 01. 13. [levites]
|
||||||
|
|
||||||
|
#include "../EterGrnLib/ThingInstance.h"
|
||||||
|
|
||||||
|
class CItemData;
|
||||||
|
|
||||||
|
class CPythonItem : public CSingleton<CPythonItem>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
INVALID_ID = 0xffffffff,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
VNUM_MONEY = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
USESOUND_NONE,
|
||||||
|
USESOUND_DEFAULT,
|
||||||
|
USESOUND_ARMOR,
|
||||||
|
USESOUND_WEAPON,
|
||||||
|
USESOUND_BOW,
|
||||||
|
USESOUND_ACCESSORY,
|
||||||
|
USESOUND_POTION,
|
||||||
|
USESOUND_PORTAL,
|
||||||
|
USESOUND_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DROPSOUND_DEFAULT,
|
||||||
|
DROPSOUND_ARMOR,
|
||||||
|
DROPSOUND_WEAPON,
|
||||||
|
DROPSOUND_BOW,
|
||||||
|
DROPSOUND_ACCESSORY,
|
||||||
|
DROPSOUND_NUM
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SGroundItemInstance
|
||||||
|
{
|
||||||
|
DWORD dwVirtualNumber;
|
||||||
|
D3DXVECTOR3 v3EndPosition;
|
||||||
|
|
||||||
|
D3DXVECTOR3 v3RotationAxis;
|
||||||
|
D3DXQUATERNION qEnd;
|
||||||
|
D3DXVECTOR3 v3Center;
|
||||||
|
CGraphicThingInstance ThingInstance;
|
||||||
|
DWORD dwStartTime;
|
||||||
|
DWORD dwEndTime;
|
||||||
|
|
||||||
|
DWORD eDropSoundType;
|
||||||
|
|
||||||
|
bool bAnimEnded;
|
||||||
|
bool Update();
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
DWORD dwEffectInstanceIndex;
|
||||||
|
std::string stOwnership;
|
||||||
|
|
||||||
|
static void __PlayDropSound(DWORD eItemType, const D3DXVECTOR3& c_rv3Pos);
|
||||||
|
static std::string ms_astDropSoundFileName[DROPSOUND_NUM];
|
||||||
|
|
||||||
|
SGroundItemInstance() {}
|
||||||
|
virtual ~SGroundItemInstance() {}
|
||||||
|
} TGroundItemInstance;
|
||||||
|
|
||||||
|
typedef std::map<DWORD, TGroundItemInstance *> TGroundItemInstanceMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonItem(void);
|
||||||
|
virtual ~CPythonItem(void);
|
||||||
|
|
||||||
|
// Initialize
|
||||||
|
void Destroy();
|
||||||
|
void Create();
|
||||||
|
|
||||||
|
void PlayUseSound(DWORD dwItemID);
|
||||||
|
void PlayDropSound(DWORD dwItemID);
|
||||||
|
void PlayUsePotionSound();
|
||||||
|
|
||||||
|
void SetUseSoundFileName(DWORD eItemType, const std::string& c_rstFileName);
|
||||||
|
void SetDropSoundFileName(DWORD eItemType, const std::string& c_rstFileName);
|
||||||
|
|
||||||
|
void GetInfo(std::string* pstInfo);
|
||||||
|
|
||||||
|
void DeleteAllItems();
|
||||||
|
|
||||||
|
void Render();
|
||||||
|
void Update(const POINT& c_rkPtMouse);
|
||||||
|
|
||||||
|
void CreateItem(DWORD dwVirtualID, DWORD dwVirtualNumber, float x, float y, float z, bool bDrop=true);
|
||||||
|
void DeleteItem(DWORD dwVirtualID);
|
||||||
|
void SetOwnership(DWORD dwVID, const char * c_pszName);
|
||||||
|
bool GetOwnership(DWORD dwVID, const char ** c_pszName);
|
||||||
|
|
||||||
|
BOOL GetGroundItemPosition(DWORD dwVirtualID, TPixelPosition * pPosition);
|
||||||
|
|
||||||
|
bool GetPickedItemID(DWORD* pdwPickedItemID);
|
||||||
|
|
||||||
|
bool GetCloseItem(const TPixelPosition & c_rPixelPosition, DWORD* pdwItemID, DWORD dwDistance=300);
|
||||||
|
bool GetCloseMoney(const TPixelPosition & c_rPixelPosition, DWORD* dwItemID, DWORD dwDistance=300);
|
||||||
|
|
||||||
|
DWORD GetVirtualNumberOfGroundItem(DWORD dwVID);
|
||||||
|
|
||||||
|
void BuildNoGradeNameData(int iType);
|
||||||
|
DWORD GetNoGradeNameDataCount();
|
||||||
|
CItemData * GetNoGradeNameDataPtr(DWORD dwIndex);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
DWORD __Pick(const POINT& c_rkPtMouse);
|
||||||
|
|
||||||
|
DWORD __GetUseSoundType(const CItemData& c_rkItemData);
|
||||||
|
DWORD __GetDropSoundType(const CItemData& c_rkItemData);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TGroundItemInstanceMap m_GroundItemInstanceMap;
|
||||||
|
CDynamicPool<TGroundItemInstance> m_GroundItemInstancePool;
|
||||||
|
|
||||||
|
DWORD m_dwDropItemEffectID;
|
||||||
|
DWORD m_dwPickedItemID;
|
||||||
|
|
||||||
|
int m_nMouseX;
|
||||||
|
int m_nMouseY;
|
||||||
|
|
||||||
|
std::string m_astUseSoundFileName[USESOUND_NUM];
|
||||||
|
|
||||||
|
std::vector<CItemData *> m_NoGradeNameItemData;
|
||||||
|
};
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CPythonMessenger : public CSingleton<CPythonMessenger>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef std::set<std::string> TFriendNameMap;
|
||||||
|
typedef std::map<std::string, BYTE> TGuildMemberStateMap;
|
||||||
|
|
||||||
|
enum EMessengerGroupIndex
|
||||||
|
{
|
||||||
|
MESSENGER_GRUOP_INDEX_FRIEND,
|
||||||
|
MESSENGER_GRUOP_INDEX_GUILD,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonMessenger();
|
||||||
|
virtual ~CPythonMessenger();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
// Friend
|
||||||
|
void RemoveFriend(const char * c_szKey);
|
||||||
|
void OnFriendLogin(const char * c_szKey);
|
||||||
|
void OnFriendLogout(const char * c_szKey);
|
||||||
|
void SetMobile(const char * c_szKey, BYTE byState);
|
||||||
|
BOOL IsFriendByKey(const char * c_szKey);
|
||||||
|
BOOL IsFriendByName(const char * c_szName);
|
||||||
|
|
||||||
|
// Guild
|
||||||
|
void AppendGuildMember(const char * c_szName);
|
||||||
|
void RemoveGuildMember(const char * c_szName);
|
||||||
|
void RemoveAllGuildMember();
|
||||||
|
void LoginGuildMember(const char * c_szName);
|
||||||
|
void LogoutGuildMember(const char * c_szName);
|
||||||
|
void RefreshGuildMember();
|
||||||
|
|
||||||
|
void SetMessengerHandler(PyObject* poHandler);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TFriendNameMap m_FriendNameMap;
|
||||||
|
TGuildMemberStateMap m_GuildMemberStateMap;
|
||||||
|
|
||||||
|
private:
|
||||||
|
PyObject * m_poMessengerHandler;
|
||||||
|
};
|
||||||
@@ -0,0 +1,253 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "PythonBackground.h"
|
||||||
|
|
||||||
|
class CPythonMiniMap : public CScreen, public CSingleton<CPythonMiniMap>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
EMPIRE_NUM = 4,
|
||||||
|
|
||||||
|
MINI_WAYPOINT_IMAGE_COUNT = 12,
|
||||||
|
WAYPOINT_IMAGE_COUNT = 15,
|
||||||
|
TARGET_MARK_IMAGE_COUNT = 2,
|
||||||
|
};
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
TYPE_OPC,
|
||||||
|
TYPE_OPCPVP,
|
||||||
|
TYPE_OPCPVPSELF,
|
||||||
|
TYPE_NPC,
|
||||||
|
TYPE_MONSTER,
|
||||||
|
TYPE_WARP,
|
||||||
|
TYPE_WAYPOINT,
|
||||||
|
TYPE_PARTY,
|
||||||
|
TYPE_EMPIRE,
|
||||||
|
TYPE_EMPIRE_END = TYPE_EMPIRE + EMPIRE_NUM,
|
||||||
|
TYPE_TARGET,
|
||||||
|
TYPE_COUNT,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonMiniMap();
|
||||||
|
virtual ~CPythonMiniMap();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
bool Create();
|
||||||
|
|
||||||
|
bool IsAtlas();
|
||||||
|
bool CanShow();
|
||||||
|
bool CanShowAtlas();
|
||||||
|
|
||||||
|
void SetMiniMapSize(float fWidth, float fHeight);
|
||||||
|
void SetScale(float fScale);
|
||||||
|
void ScaleUp();
|
||||||
|
void ScaleDown();
|
||||||
|
|
||||||
|
void SetCenterPosition(float fCenterX, float fCenterY);
|
||||||
|
|
||||||
|
void Update(float fCenterX, float fCenterY);
|
||||||
|
void Render(float fScreenX, float fScreenY);
|
||||||
|
|
||||||
|
void Show();
|
||||||
|
void Hide();
|
||||||
|
|
||||||
|
bool GetPickedInstanceInfo(float fScreenX, float fScreenY, std::string & rReturnName, float * pReturnPosX, float * pReturnPosY, DWORD * pdwTextColor);
|
||||||
|
|
||||||
|
// Atlas
|
||||||
|
bool LoadAtlas();
|
||||||
|
void UpdateAtlas();
|
||||||
|
void RenderAtlas(float fScreenX, float fScreenY);
|
||||||
|
void ShowAtlas();
|
||||||
|
void HideAtlas();
|
||||||
|
|
||||||
|
bool GetAtlasInfo(float fScreenX, float fScreenY, std::string & rReturnString, float * pReturnPosX, float * pReturnPosY, DWORD * pdwTextColor, DWORD * pdwGuildID);
|
||||||
|
bool GetAtlasSize(float * pfSizeX, float * pfSizeY);
|
||||||
|
|
||||||
|
void AddObserver(DWORD dwVID, float fSrcX, float fSrcY);
|
||||||
|
void MoveObserver(DWORD dwVID, float fDstX, float fDstY);
|
||||||
|
void RemoveObserver(DWORD dwVID);
|
||||||
|
|
||||||
|
// WayPoint
|
||||||
|
void AddWayPoint(BYTE byType, DWORD dwID, float fX, float fY, std::string strText, DWORD dwChrVID=0);
|
||||||
|
void RemoveWayPoint(DWORD dwID);
|
||||||
|
|
||||||
|
// SignalPoint
|
||||||
|
void AddSignalPoint(float fX, float fY);
|
||||||
|
void ClearAllSignalPoint();
|
||||||
|
|
||||||
|
void RegisterAtlasWindow(PyObject* poHandler);
|
||||||
|
void UnregisterAtlasWindow();
|
||||||
|
void OpenAtlasWindow();
|
||||||
|
void SetAtlasCenterPosition(int x, int y);
|
||||||
|
|
||||||
|
// NPC List
|
||||||
|
void ClearAtlasMarkInfo();
|
||||||
|
void RegisterAtlasMark(BYTE byType, const char * c_szName, long lx, long ly);
|
||||||
|
|
||||||
|
// Guild
|
||||||
|
void ClearGuildArea();
|
||||||
|
void RegisterGuildArea(DWORD dwID, DWORD dwGuildID, long x, long y, long width, long height);
|
||||||
|
DWORD GetGuildAreaID(DWORD x, DWORD y);
|
||||||
|
|
||||||
|
// Target
|
||||||
|
void CreateTarget(int iID, const char * c_szName);
|
||||||
|
void CreateTarget(int iID, const char * c_szName, DWORD dwVID);
|
||||||
|
void UpdateTarget(int iID, int ix, int iy);
|
||||||
|
void DeleteTarget(int iID);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Initialize();
|
||||||
|
void __SetPosition();
|
||||||
|
void __LoadAtlasMarkInfo();
|
||||||
|
|
||||||
|
void __RenderWayPointMark(int ixCenter, int iyCenter);
|
||||||
|
void __RenderMiniWayPointMark(int ixCenter, int iyCenter);
|
||||||
|
void __RenderTargetMark(int ixCenter, int iyCenter);
|
||||||
|
|
||||||
|
void __GlobalPositionToAtlasPosition(long lx, long ly, float * pfx, float * pfy);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Atlas
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
BYTE m_byType;
|
||||||
|
DWORD m_dwID; // For WayPoint
|
||||||
|
float m_fX;
|
||||||
|
float m_fY;
|
||||||
|
float m_fScreenX;
|
||||||
|
float m_fScreenY;
|
||||||
|
float m_fMiniMapX;
|
||||||
|
float m_fMiniMapY;
|
||||||
|
DWORD m_dwChrVID;
|
||||||
|
std::string m_strText;
|
||||||
|
} TAtlasMarkInfo;
|
||||||
|
|
||||||
|
// GuildArea
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
DWORD dwGuildID;
|
||||||
|
long lx, ly;
|
||||||
|
long lwidth, lheight;
|
||||||
|
|
||||||
|
float fsxRender, fsyRender;
|
||||||
|
float fexRender, feyRender;
|
||||||
|
} TGuildAreaInfo;
|
||||||
|
|
||||||
|
struct SObserver
|
||||||
|
{
|
||||||
|
float fCurX;
|
||||||
|
float fCurY;
|
||||||
|
float fSrcX;
|
||||||
|
float fSrcY;
|
||||||
|
float fDstX;
|
||||||
|
float fDstY;
|
||||||
|
|
||||||
|
DWORD dwSrcTime;
|
||||||
|
DWORD dwDstTime;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 캐릭터 리스트
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
float m_fX;
|
||||||
|
float m_fY;
|
||||||
|
UINT m_eNameColor;
|
||||||
|
} TMarkPosition;
|
||||||
|
|
||||||
|
typedef std::vector<TMarkPosition> TInstanceMarkPositionVector;
|
||||||
|
typedef TInstanceMarkPositionVector::iterator TInstancePositionVectorIterator;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool __GetWayPoint(DWORD dwID, TAtlasMarkInfo ** ppkInfo);
|
||||||
|
void __UpdateWayPoint(TAtlasMarkInfo * pkInfo, int ix, int iy);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
float m_fWidth;
|
||||||
|
float m_fHeight;
|
||||||
|
|
||||||
|
float m_fScale;
|
||||||
|
|
||||||
|
float m_fCenterX;
|
||||||
|
float m_fCenterY;
|
||||||
|
|
||||||
|
float m_fCenterCellX;
|
||||||
|
float m_fCenterCellY;
|
||||||
|
|
||||||
|
float m_fScreenX;
|
||||||
|
float m_fScreenY;
|
||||||
|
|
||||||
|
float m_fMiniMapRadius;
|
||||||
|
|
||||||
|
// 맵 그림...
|
||||||
|
LPDIRECT3DTEXTURE8 m_lpMiniMapTexture[AROUND_AREA_NUM];
|
||||||
|
|
||||||
|
// 미니맵 커버
|
||||||
|
CGraphicImageInstance m_MiniMapFilterGraphicImageInstance;
|
||||||
|
CGraphicExpandedImageInstance m_MiniMapCameraraphicImageInstance;
|
||||||
|
|
||||||
|
// 캐릭터 마크
|
||||||
|
CGraphicExpandedImageInstance m_PlayerMark;
|
||||||
|
CGraphicImageInstance m_WhiteMark;
|
||||||
|
|
||||||
|
TInstanceMarkPositionVector m_PartyPCPositionVector;
|
||||||
|
TInstanceMarkPositionVector m_OtherPCPositionVector;
|
||||||
|
TInstanceMarkPositionVector m_NPCPositionVector;
|
||||||
|
TInstanceMarkPositionVector m_MonsterPositionVector;
|
||||||
|
TInstanceMarkPositionVector m_WarpPositionVector;
|
||||||
|
std::map<DWORD, SObserver> m_kMap_dwVID_kObserver;
|
||||||
|
|
||||||
|
bool m_bAtlas;
|
||||||
|
bool m_bShow;
|
||||||
|
|
||||||
|
CGraphicVertexBuffer m_VertexBuffer;
|
||||||
|
CGraphicIndexBuffer m_IndexBuffer;
|
||||||
|
|
||||||
|
D3DXMATRIX m_matIdentity;
|
||||||
|
D3DXMATRIX m_matWorld;
|
||||||
|
D3DXMATRIX m_matMiniMapCover;
|
||||||
|
|
||||||
|
bool m_bShowAtlas;
|
||||||
|
CGraphicImageInstance m_AtlasImageInstance;
|
||||||
|
D3DXMATRIX m_matWorldAtlas;
|
||||||
|
CGraphicExpandedImageInstance m_AtlasPlayerMark;
|
||||||
|
|
||||||
|
float m_fAtlasScreenX;
|
||||||
|
float m_fAtlasScreenY;
|
||||||
|
|
||||||
|
DWORD m_dwAtlasBaseX;
|
||||||
|
DWORD m_dwAtlasBaseY;
|
||||||
|
|
||||||
|
float m_fAtlasMaxX;
|
||||||
|
float m_fAtlasMaxY;
|
||||||
|
|
||||||
|
float m_fAtlasImageSizeX;
|
||||||
|
float m_fAtlasImageSizeY;
|
||||||
|
|
||||||
|
typedef std::vector<TAtlasMarkInfo> TAtlasMarkInfoVector;
|
||||||
|
typedef TAtlasMarkInfoVector::iterator TAtlasMarkInfoVectorIterator;
|
||||||
|
typedef std::vector<TGuildAreaInfo> TGuildAreaInfoVector;
|
||||||
|
typedef TGuildAreaInfoVector::iterator TGuildAreaInfoVectorIterator;
|
||||||
|
TAtlasMarkInfoVectorIterator m_AtlasMarkInfoVectorIterator;
|
||||||
|
TAtlasMarkInfoVector m_AtlasNPCInfoVector;
|
||||||
|
TAtlasMarkInfoVector m_AtlasWarpInfoVector;
|
||||||
|
|
||||||
|
// WayPoint
|
||||||
|
CGraphicExpandedImageInstance m_MiniWayPointGraphicImageInstances[MINI_WAYPOINT_IMAGE_COUNT];
|
||||||
|
CGraphicExpandedImageInstance m_WayPointGraphicImageInstances[WAYPOINT_IMAGE_COUNT];
|
||||||
|
CGraphicExpandedImageInstance m_TargetMarkGraphicImageInstances[TARGET_MARK_IMAGE_COUNT];
|
||||||
|
CGraphicImageInstance m_GuildAreaFlagImageInstance;
|
||||||
|
TAtlasMarkInfoVector m_AtlasWayPointInfoVector;
|
||||||
|
TGuildAreaInfoVector m_GuildAreaInfoVector;
|
||||||
|
|
||||||
|
// SignalPoint
|
||||||
|
struct TSignalPoint
|
||||||
|
{
|
||||||
|
D3DXVECTOR2 v2Pos;
|
||||||
|
unsigned int id;
|
||||||
|
};
|
||||||
|
std::vector<TSignalPoint> m_SignalPointVector;
|
||||||
|
|
||||||
|
PyObject* m_poHandler;
|
||||||
|
};
|
||||||
@@ -0,0 +1,738 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/FuncObject.h"
|
||||||
|
#include "../EterLib/NetStream.h"
|
||||||
|
#include "../EterLib/NetPacketHeaderMap.h"
|
||||||
|
|
||||||
|
#include "InsultChecker.h"
|
||||||
|
|
||||||
|
#include "Packet.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
class CNetworkActorManager;
|
||||||
|
struct SNetworkActorData;
|
||||||
|
struct SNetworkUpdateActorData;
|
||||||
|
|
||||||
|
class CPythonNetworkStream : public CNetworkStream, public CSingleton<CPythonNetworkStream>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SERVER_COMMAND_LOG_OUT = 0,
|
||||||
|
SERVER_COMMAND_RETURN_TO_SELECT_CHARACTER = 1,
|
||||||
|
SERVER_COMMAND_QUIT = 2,
|
||||||
|
|
||||||
|
MAX_ACCOUNT_PLAYER
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ERROR_NONE,
|
||||||
|
ERROR_UNKNOWN,
|
||||||
|
ERROR_CONNECT_MARK_SERVER,
|
||||||
|
ERROR_LOAD_MARK,
|
||||||
|
ERROR_MARK_WIDTH,
|
||||||
|
ERROR_MARK_HEIGHT,
|
||||||
|
|
||||||
|
// MARK_BUG_FIX
|
||||||
|
ERROR_MARK_UPLOAD_NEED_RECONNECT,
|
||||||
|
ERROR_MARK_CHECK_NEED_RECONNECT,
|
||||||
|
// END_OF_MARK_BUG_FIX
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
ACCOUNT_CHARACTER_SLOT_ID,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_NAME,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_RACE,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_LEVEL,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_STR,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_DEX,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_HTH,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_INT,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_PLAYTIME,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_FORM,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_ADDR,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_PORT,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_GUILD_ID,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_GUILD_NAME,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_CHANGE_NAME_FLAG,
|
||||||
|
ACCOUNT_CHARACTER_SLOT_HAIR,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
PHASE_WINDOW_LOGO,
|
||||||
|
PHASE_WINDOW_LOGIN,
|
||||||
|
PHASE_WINDOW_SELECT,
|
||||||
|
PHASE_WINDOW_CREATE,
|
||||||
|
PHASE_WINDOW_LOAD,
|
||||||
|
PHASE_WINDOW_GAME,
|
||||||
|
PHASE_WINDOW_EMPIRE,
|
||||||
|
PHASE_WINDOW_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonNetworkStream();
|
||||||
|
virtual ~CPythonNetworkStream();
|
||||||
|
|
||||||
|
bool SendSpecial(int nLen, void * pvBuf);
|
||||||
|
|
||||||
|
void StartGame();
|
||||||
|
void Warp(LONG lGlobalX, LONG lGlobalY);
|
||||||
|
|
||||||
|
void NotifyHack(const char* c_szMsg);
|
||||||
|
void SetWaitFlag();
|
||||||
|
#if defined(ENABLE_DISCORD_RPC)
|
||||||
|
void Discord_Start();
|
||||||
|
void Discord_Close();
|
||||||
|
void Discord_Update(const bool bInGame);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void SendEmoticon(UINT eEmoticon);
|
||||||
|
|
||||||
|
void ExitApplication();
|
||||||
|
void ExitGame();
|
||||||
|
void LogOutGame();
|
||||||
|
void AbsoluteExitGame();
|
||||||
|
void AbsoluteExitApplication();
|
||||||
|
|
||||||
|
void EnableChatInsultFilter(bool isEnable);
|
||||||
|
bool IsChatInsultIn(const char* c_szMsg);
|
||||||
|
bool IsInsultIn(const char* c_szMsg);
|
||||||
|
|
||||||
|
DWORD GetGuildID();
|
||||||
|
|
||||||
|
UINT UploadMark(const char* c_szImageFileName);
|
||||||
|
UINT UploadSymbol(const char* c_szImageFileName);
|
||||||
|
|
||||||
|
bool LoadInsultList(const char* c_szInsultListFileName);
|
||||||
|
bool LoadConvertTable(DWORD dwEmpireID, const char* c_szFileName);
|
||||||
|
|
||||||
|
UINT GetAccountCharacterSlotDatau(UINT iSlot, UINT eType);
|
||||||
|
const char* GetAccountCharacterSlotDataz(UINT iSlot, UINT eType);
|
||||||
|
|
||||||
|
// SUPPORT_BGM
|
||||||
|
const char* GetFieldMusicFileName();
|
||||||
|
float GetFieldMusicVolume();
|
||||||
|
// END_OF_SUPPORT_BGM
|
||||||
|
|
||||||
|
bool IsSelectedEmpire();
|
||||||
|
|
||||||
|
void ToggleGameDebugInfo();
|
||||||
|
|
||||||
|
void SetMarkServer(const char* c_szAddr, UINT uPort);
|
||||||
|
void ConnectLoginServer(const char* c_szAddr, UINT uPort);
|
||||||
|
void ConnectGameServer(UINT iChrSlot);
|
||||||
|
|
||||||
|
void SetLoginInfo(const char* c_szID, const char* c_szPassword);
|
||||||
|
void SetLoginKey(DWORD dwLoginKey);
|
||||||
|
void ClearLoginInfo( void );
|
||||||
|
|
||||||
|
void SetHandler(PyObject* poHandler);
|
||||||
|
void SetPhaseWindow(UINT ePhaseWnd, PyObject* poPhaseWnd);
|
||||||
|
void ClearPhaseWindow(UINT ePhaseWnd, PyObject* poPhaseWnd);
|
||||||
|
void SetServerCommandParserWindow(PyObject* poPhaseWnd);
|
||||||
|
|
||||||
|
bool SendSyncPositionElementPacket(DWORD dwVictimVID, DWORD dwVictimX, DWORD dwVictimY);
|
||||||
|
|
||||||
|
bool SendAttackPacket(UINT uMotAttack, DWORD dwVIDVictim);
|
||||||
|
bool SendCharacterStatePacket(const TPixelPosition& c_rkPPosDst, float fDstRot, UINT eFunc, UINT uArg);
|
||||||
|
bool SendUseSkillPacket(DWORD dwSkillIndex, DWORD dwTargetVID=0);
|
||||||
|
bool SendTargetPacket(DWORD dwVID);
|
||||||
|
|
||||||
|
// OLDCODE:
|
||||||
|
bool SendCharacterStartWalkingPacket(float fRotation, long lx, long ly);
|
||||||
|
bool SendCharacterEndWalkingPacket(float fRotation, long lx, long ly);
|
||||||
|
bool SendCharacterCheckWalkingPacket(float fRotation, long lx, long ly);
|
||||||
|
|
||||||
|
bool SendCharacterPositionPacket(BYTE iPosition);
|
||||||
|
|
||||||
|
bool SendItemUsePacket(TItemPos pos);
|
||||||
|
bool SendItemUseToItemPacket(TItemPos source_pos, TItemPos target_pos);
|
||||||
|
bool SendItemDropPacket(TItemPos pos, DWORD elk);
|
||||||
|
bool SendItemDropPacketNew(TItemPos pos, DWORD elk, DWORD count);
|
||||||
|
bool SendItemMovePacket(TItemPos pos, TItemPos change_pos, BYTE num);
|
||||||
|
bool SendItemPickUpPacket(DWORD vid);
|
||||||
|
|
||||||
|
bool SendQuickSlotAddPacket(BYTE wpos, BYTE type, BYTE pos);
|
||||||
|
bool SendQuickSlotDelPacket(BYTE wpos);
|
||||||
|
bool SendQuickSlotMovePacket(BYTE wpos, BYTE change_pos);
|
||||||
|
|
||||||
|
// PointReset 개 임시
|
||||||
|
bool SendPointResetPacket();
|
||||||
|
|
||||||
|
// Shop
|
||||||
|
bool SendShopEndPacket();
|
||||||
|
bool SendShopBuyPacket(BYTE byCount);
|
||||||
|
bool SendShopSellPacket(BYTE bySlot);
|
||||||
|
bool SendShopSellPacketNew(BYTE bySlot, BYTE byCount);
|
||||||
|
|
||||||
|
// Exchange
|
||||||
|
bool SendExchangeStartPacket(DWORD vid);
|
||||||
|
bool SendExchangeItemAddPacket(TItemPos ItemPos, BYTE byDisplayPos);
|
||||||
|
bool SendExchangeElkAddPacket(DWORD elk);
|
||||||
|
bool SendExchangeItemDelPacket(BYTE pos);
|
||||||
|
bool SendExchangeAcceptPacket();
|
||||||
|
bool SendExchangeExitPacket();
|
||||||
|
|
||||||
|
// Quest
|
||||||
|
bool SendScriptAnswerPacket(int iAnswer);
|
||||||
|
bool SendScriptButtonPacket(unsigned int iIndex);
|
||||||
|
bool SendAnswerMakeGuildPacket(const char * c_szName);
|
||||||
|
bool SendQuestInputStringPacket(const char * c_szString);
|
||||||
|
bool SendQuestConfirmPacket(BYTE byAnswer, DWORD dwPID);
|
||||||
|
|
||||||
|
// Event
|
||||||
|
bool SendOnClickPacket(DWORD vid);
|
||||||
|
|
||||||
|
// Fly
|
||||||
|
bool SendFlyTargetingPacket(DWORD dwTargetVID, const TPixelPosition& kPPosTarget);
|
||||||
|
bool SendAddFlyTargetingPacket(DWORD dwTargetVID, const TPixelPosition& kPPosTarget);
|
||||||
|
bool SendShootPacket(UINT uSkill);
|
||||||
|
|
||||||
|
// Command
|
||||||
|
bool ClientCommand(const char * c_szCommand);
|
||||||
|
void ServerCommand(char * c_szCommand);
|
||||||
|
|
||||||
|
// Emoticon
|
||||||
|
void RegisterEmoticonString(const char * pcEmoticonString);
|
||||||
|
|
||||||
|
// Party
|
||||||
|
bool SendPartyInvitePacket(DWORD dwVID);
|
||||||
|
bool SendPartyInviteAnswerPacket(DWORD dwLeaderVID, BYTE byAccept);
|
||||||
|
bool SendPartyRemovePacket(DWORD dwPID);
|
||||||
|
bool SendPartySetStatePacket(DWORD dwVID, BYTE byState, BYTE byFlag);
|
||||||
|
bool SendPartyUseSkillPacket(BYTE bySkillIndex, DWORD dwVID);
|
||||||
|
bool SendPartyParameterPacket(BYTE byDistributeMode);
|
||||||
|
|
||||||
|
// SafeBox
|
||||||
|
bool SendSafeBoxMoneyPacket(BYTE byState, DWORD dwMoney);
|
||||||
|
bool SendSafeBoxCheckinPacket(TItemPos InventoryPos, BYTE bySafeBoxPos);
|
||||||
|
bool SendSafeBoxCheckoutPacket(BYTE bySafeBoxPos, TItemPos InventoryPos);
|
||||||
|
bool SendSafeBoxItemMovePacket(BYTE bySourcePos, BYTE byTargetPos, BYTE byCount);
|
||||||
|
|
||||||
|
// Mall
|
||||||
|
bool SendMallCheckoutPacket(BYTE byMallPos, TItemPos InventoryPos);
|
||||||
|
|
||||||
|
// Guild
|
||||||
|
bool SendGuildAddMemberPacket(DWORD dwVID);
|
||||||
|
bool SendGuildRemoveMemberPacket(DWORD dwPID);
|
||||||
|
bool SendGuildChangeGradeNamePacket(BYTE byGradeNumber, const char * c_szName);
|
||||||
|
bool SendGuildChangeGradeAuthorityPacket(BYTE byGradeNumber, BYTE byAuthority);
|
||||||
|
bool SendGuildOfferPacket(DWORD dwExperience);
|
||||||
|
bool SendGuildPostCommentPacket(const char * c_szMessage);
|
||||||
|
bool SendGuildDeleteCommentPacket(DWORD dwIndex);
|
||||||
|
bool SendGuildRefreshCommentsPacket(DWORD dwHighestIndex);
|
||||||
|
bool SendGuildChangeMemberGradePacket(DWORD dwPID, BYTE byGrade);
|
||||||
|
bool SendGuildUseSkillPacket(DWORD dwSkillID, DWORD dwTargetVID);
|
||||||
|
bool SendGuildChangeMemberGeneralPacket(DWORD dwPID, BYTE byFlag);
|
||||||
|
bool SendGuildInvitePacket(DWORD dwVID);
|
||||||
|
bool SendGuildInviteAnswerPacket(DWORD dwGuildID, BYTE byAnswer);
|
||||||
|
bool SendGuildChargeGSPPacket(DWORD dwMoney);
|
||||||
|
bool SendGuildDepositMoneyPacket(DWORD dwMoney);
|
||||||
|
bool SendGuildWithdrawMoneyPacket(DWORD dwMoney);
|
||||||
|
|
||||||
|
// Mall
|
||||||
|
bool RecvMallOpenPacket();
|
||||||
|
bool RecvMallItemSetPacket();
|
||||||
|
bool RecvMallItemDelPacket();
|
||||||
|
|
||||||
|
// Lover
|
||||||
|
bool RecvLoverInfoPacket();
|
||||||
|
bool RecvLovePointUpdatePacket();
|
||||||
|
|
||||||
|
// Dig
|
||||||
|
bool RecvDigMotionPacket();
|
||||||
|
|
||||||
|
// Fishing
|
||||||
|
bool SendFishingPacket(int iRotation);
|
||||||
|
bool SendGiveItemPacket(DWORD dwTargetVID, TItemPos ItemPos, int iItemCount);
|
||||||
|
|
||||||
|
// Private Shop
|
||||||
|
bool SendBuildPrivateShopPacket(const char * c_szName, const std::vector<TShopItemTable> & c_rSellingItemStock);
|
||||||
|
|
||||||
|
// Refine
|
||||||
|
bool SendRefinePacket(BYTE byPos, BYTE byType);
|
||||||
|
bool SendSelectItemPacket(DWORD dwItemPos);
|
||||||
|
|
||||||
|
// Client Version
|
||||||
|
bool SendClientVersionPacket();
|
||||||
|
|
||||||
|
// CRC Report
|
||||||
|
bool __SendCRCReportPacket();
|
||||||
|
|
||||||
|
// 용홍석 강화
|
||||||
|
bool SendDragonSoulRefinePacket(BYTE bRefineType, TItemPos* pos);
|
||||||
|
|
||||||
|
// Handshake
|
||||||
|
bool RecvHandshakePacket();
|
||||||
|
bool RecvHandshakeOKPacket();
|
||||||
|
|
||||||
|
bool RecvHybridCryptKeyPacket();
|
||||||
|
bool RecvHybridCryptSDBPacket();
|
||||||
|
#ifdef _IMPROVED_PACKET_ENCRYPTION_
|
||||||
|
bool RecvKeyAgreementPacket();
|
||||||
|
bool RecvKeyAgreementCompletedPacket();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
// ETC
|
||||||
|
DWORD GetMainActorVID();
|
||||||
|
DWORD GetMainActorRace();
|
||||||
|
DWORD GetMainActorEmpire();
|
||||||
|
DWORD GetMainActorSkillGroup();
|
||||||
|
void SetEmpireID(DWORD dwEmpireID);
|
||||||
|
DWORD GetEmpireID();
|
||||||
|
void __TEST_SetSkillGroupFake(int iIndex);
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// Phase 관련
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
public:
|
||||||
|
void SetOffLinePhase();
|
||||||
|
void SetHandShakePhase();
|
||||||
|
void SetLoginPhase();
|
||||||
|
void SetSelectPhase();
|
||||||
|
void SetLoadingPhase();
|
||||||
|
void SetGamePhase();
|
||||||
|
void ClosePhase();
|
||||||
|
|
||||||
|
// Login Phase
|
||||||
|
bool SendLoginPacket(const char * c_szName, const char * c_szPassword);
|
||||||
|
bool SendLoginPacketNew(const char * c_szName, const char * c_szPassword);
|
||||||
|
bool SendChinaMatrixCardPacket(const char * c_szMatrixCardString);
|
||||||
|
bool SendRunupMatrixAnswerPacket(const char * c_szMatrixCardString);
|
||||||
|
bool SendNEWCIBNPasspodAnswerPacket(const char * answer);
|
||||||
|
bool SendDirectEnterPacket(const char * c_szName, const char * c_szPassword, UINT uChrSlot);
|
||||||
|
|
||||||
|
bool SendEnterGame();
|
||||||
|
|
||||||
|
// Select Phase
|
||||||
|
bool SendSelectEmpirePacket(DWORD dwEmpireID);
|
||||||
|
bool SendSelectCharacterPacket(BYTE account_Index);
|
||||||
|
bool SendChangeNamePacket(BYTE index, const char *name);
|
||||||
|
bool SendCreateCharacterPacket(BYTE index, const char *name, BYTE job, BYTE shape, BYTE byStat1, BYTE byStat2, BYTE byStat3, BYTE byStat4);
|
||||||
|
bool SendDestroyCharacterPacket(BYTE index, const char * szPrivateCode);
|
||||||
|
|
||||||
|
// Main Game Phase
|
||||||
|
bool SendC2CPacket(DWORD dwSize, void * pData);
|
||||||
|
bool SendChatPacket(const char * c_szChat, BYTE byType = CHAT_TYPE_TALKING);
|
||||||
|
bool SendWhisperPacket(const char * name, const char * c_szChat);
|
||||||
|
bool SendMobileMessagePacket(const char * name, const char * c_szChat);
|
||||||
|
bool SendMessengerAddByVIDPacket(DWORD vid);
|
||||||
|
bool SendMessengerAddByNamePacket(const char * c_szName);
|
||||||
|
bool SendMessengerRemovePacket(const char * c_szKey, const char * c_szName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool OnProcess(); // State들을 실제로 실행한다.
|
||||||
|
void OffLinePhase();
|
||||||
|
void HandShakePhase();
|
||||||
|
void LoginPhase();
|
||||||
|
void SelectPhase();
|
||||||
|
void LoadingPhase();
|
||||||
|
void GamePhase();
|
||||||
|
|
||||||
|
bool __IsNotPing();
|
||||||
|
|
||||||
|
void __DownloadMark();
|
||||||
|
void __DownloadSymbol(const std::vector<DWORD> & c_rkVec_dwGuildID);
|
||||||
|
|
||||||
|
void __PlayInventoryItemUseSound(TItemPos uSlotPos);
|
||||||
|
void __PlayInventoryItemDropSound(TItemPos uSlotPos);
|
||||||
|
//void __PlayShopItemDropSound(UINT uSlotPos);
|
||||||
|
void __PlaySafeBoxItemDropSound(UINT uSlotPos);
|
||||||
|
void __PlayMallItemDropSound(UINT uSlotPos);
|
||||||
|
|
||||||
|
bool __CanActMainInstance();
|
||||||
|
|
||||||
|
enum REFRESH_WINDOW_TYPE
|
||||||
|
{
|
||||||
|
RefreshStatus = (1 << 0),
|
||||||
|
RefreshAlignmentWindow = (1 << 1),
|
||||||
|
RefreshCharacterWindow = (1 << 2),
|
||||||
|
RefreshEquipmentWindow = (1 << 3),
|
||||||
|
RefreshInventoryWindow = (1 << 4),
|
||||||
|
RefreshExchangeWindow = (1 << 5),
|
||||||
|
RefreshSkillWindow = (1 << 6),
|
||||||
|
RefreshSafeboxWindow = (1 << 7),
|
||||||
|
RefreshMessengerWindow = (1 << 8),
|
||||||
|
RefreshGuildWindowInfoPage = (1 << 9),
|
||||||
|
RefreshGuildWindowBoardPage = (1 << 10),
|
||||||
|
RefreshGuildWindowMemberPage = (1 << 11),
|
||||||
|
RefreshGuildWindowMemberPageGradeComboBox = (1 << 12),
|
||||||
|
RefreshGuildWindowSkillPage = (1 << 13),
|
||||||
|
RefreshGuildWindowGradePage = (1 << 14),
|
||||||
|
RefreshTargetBoard = (1 << 15),
|
||||||
|
RefreshMallWindow = (1 << 16),
|
||||||
|
};
|
||||||
|
|
||||||
|
void __RefreshStatus();
|
||||||
|
void __RefreshAlignmentWindow();
|
||||||
|
void __RefreshCharacterWindow();
|
||||||
|
void __RefreshEquipmentWindow();
|
||||||
|
void __RefreshInventoryWindow();
|
||||||
|
void __RefreshExchangeWindow();
|
||||||
|
void __RefreshSkillWindow();
|
||||||
|
void __RefreshSafeboxWindow();
|
||||||
|
void __RefreshMessengerWindow();
|
||||||
|
void __RefreshGuildWindowInfoPage();
|
||||||
|
void __RefreshGuildWindowBoardPage();
|
||||||
|
void __RefreshGuildWindowMemberPage();
|
||||||
|
void __RefreshGuildWindowMemberPageGradeComboBox();
|
||||||
|
void __RefreshGuildWindowSkillPage();
|
||||||
|
void __RefreshGuildWindowGradePage();
|
||||||
|
void __RefreshTargetBoardByVID(DWORD dwVID);
|
||||||
|
void __RefreshTargetBoardByName(const char * c_szName);
|
||||||
|
void __RefreshTargetBoard();
|
||||||
|
void __RefreshMallWindow();
|
||||||
|
|
||||||
|
bool __SendHack(const char* c_szMsg);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool RecvObserverAddPacket();
|
||||||
|
bool RecvObserverRemovePacket();
|
||||||
|
bool RecvObserverMovePacket();
|
||||||
|
|
||||||
|
// Common
|
||||||
|
bool RecvErrorPacket(int header);
|
||||||
|
bool RecvPingPacket();
|
||||||
|
bool RecvDefaultPacket(int header);
|
||||||
|
bool RecvPhasePacket();
|
||||||
|
|
||||||
|
// Login Phase
|
||||||
|
bool __RecvLoginSuccessPacket3();
|
||||||
|
bool __RecvLoginSuccessPacket4();
|
||||||
|
bool __RecvLoginFailurePacket();
|
||||||
|
bool __RecvEmpirePacket();
|
||||||
|
bool __RecvChinaMatrixCardPacket();
|
||||||
|
bool __RecvRunupMatrixQuizPacket();
|
||||||
|
bool __RecvNEWCIBNPasspodRequestPacket();
|
||||||
|
bool __RecvNEWCIBNPasspodFailurePacket();
|
||||||
|
bool __RecvLoginKeyPacket();
|
||||||
|
|
||||||
|
// Select Phase
|
||||||
|
bool __RecvPlayerCreateSuccessPacket();
|
||||||
|
bool __RecvPlayerCreateFailurePacket();
|
||||||
|
bool __RecvPlayerDestroySuccessPacket();
|
||||||
|
bool __RecvPlayerDestroyFailurePacket();
|
||||||
|
bool __RecvPreserveItemPacket();
|
||||||
|
bool __RecvPlayerPoints();
|
||||||
|
bool __RecvChangeName();
|
||||||
|
|
||||||
|
// Loading Phase
|
||||||
|
bool RecvMainCharacter();
|
||||||
|
bool RecvMainCharacter2_EMPIRE();
|
||||||
|
bool RecvMainCharacter3_BGM();
|
||||||
|
bool RecvMainCharacter4_BGM_VOL();
|
||||||
|
|
||||||
|
void __SetFieldMusicFileName(const char* musicName);
|
||||||
|
void __SetFieldMusicFileInfo(const char* musicName, float vol);
|
||||||
|
// END_OF_SUPPORT_BGM
|
||||||
|
|
||||||
|
// Main Game Phase
|
||||||
|
bool RecvWarpPacket();
|
||||||
|
bool RecvPVPPacket();
|
||||||
|
bool RecvDuelStartPacket();
|
||||||
|
bool RecvGlobalTimePacket();
|
||||||
|
bool RecvCharacterAppendPacket();
|
||||||
|
bool RecvCharacterAdditionalInfo();
|
||||||
|
bool RecvCharacterAppendPacketNew();
|
||||||
|
bool RecvCharacterUpdatePacket();
|
||||||
|
bool RecvCharacterUpdatePacketNew();
|
||||||
|
bool RecvCharacterDeletePacket();
|
||||||
|
bool RecvChatPacket();
|
||||||
|
bool RecvOwnerShipPacket();
|
||||||
|
bool RecvSyncPositionPacket();
|
||||||
|
bool RecvWhisperPacket();
|
||||||
|
bool RecvPointChange(); // Alarm to python
|
||||||
|
bool RecvChangeSpeedPacket();
|
||||||
|
|
||||||
|
bool RecvStunPacket();
|
||||||
|
bool RecvDeadPacket();
|
||||||
|
bool RecvCharacterMovePacket();
|
||||||
|
|
||||||
|
bool RecvItemSetPacket(); // Alarm to python
|
||||||
|
bool RecvItemSetPacket2(); // Alarm to python
|
||||||
|
bool RecvItemUsePacket(); // Alarm to python
|
||||||
|
bool RecvItemUpdatePacket(); // Alarm to python
|
||||||
|
bool RecvItemGroundAddPacket();
|
||||||
|
bool RecvItemGroundDelPacket();
|
||||||
|
bool RecvItemOwnership();
|
||||||
|
|
||||||
|
bool RecvQuickSlotAddPacket(); // Alarm to python
|
||||||
|
bool RecvQuickSlotDelPacket(); // Alarm to python
|
||||||
|
bool RecvQuickSlotMovePacket(); // Alarm to python
|
||||||
|
|
||||||
|
bool RecvCharacterPositionPacket();
|
||||||
|
bool RecvMotionPacket();
|
||||||
|
|
||||||
|
bool RecvShopPacket();
|
||||||
|
bool RecvShopSignPacket();
|
||||||
|
bool RecvExchangePacket();
|
||||||
|
|
||||||
|
// Quest
|
||||||
|
bool RecvScriptPacket();
|
||||||
|
bool RecvQuestInfoPacket();
|
||||||
|
bool RecvQuestConfirmPacket();
|
||||||
|
bool RecvRequestMakeGuild();
|
||||||
|
|
||||||
|
// Skill
|
||||||
|
bool RecvSkillLevel();
|
||||||
|
bool RecvSkillLevelNew();
|
||||||
|
bool RecvSkillCoolTimeEnd();
|
||||||
|
|
||||||
|
// Target
|
||||||
|
bool RecvTargetPacket();
|
||||||
|
bool RecvViewEquipPacket();
|
||||||
|
bool RecvDamageInfoPacket();
|
||||||
|
|
||||||
|
// Mount
|
||||||
|
bool RecvMountPacket();
|
||||||
|
|
||||||
|
// Fly
|
||||||
|
bool RecvCreateFlyPacket();
|
||||||
|
bool RecvFlyTargetingPacket();
|
||||||
|
bool RecvAddFlyTargetingPacket();
|
||||||
|
|
||||||
|
// Messenger
|
||||||
|
bool RecvMessenger();
|
||||||
|
|
||||||
|
// Guild
|
||||||
|
bool RecvGuild();
|
||||||
|
|
||||||
|
// Party
|
||||||
|
bool RecvPartyInvite();
|
||||||
|
bool RecvPartyAdd();
|
||||||
|
bool RecvPartyUpdate();
|
||||||
|
bool RecvPartyRemove();
|
||||||
|
bool RecvPartyLink();
|
||||||
|
bool RecvPartyUnlink();
|
||||||
|
bool RecvPartyParameter();
|
||||||
|
|
||||||
|
// SafeBox
|
||||||
|
bool RecvSafeBoxSetPacket();
|
||||||
|
bool RecvSafeBoxDelPacket();
|
||||||
|
bool RecvSafeBoxWrongPasswordPacket();
|
||||||
|
bool RecvSafeBoxSizePacket();
|
||||||
|
bool RecvSafeBoxMoneyChangePacket();
|
||||||
|
|
||||||
|
// Fishing
|
||||||
|
bool RecvFishing();
|
||||||
|
|
||||||
|
// Dungeon
|
||||||
|
bool RecvDungeon();
|
||||||
|
|
||||||
|
// Time
|
||||||
|
bool RecvTimePacket();
|
||||||
|
|
||||||
|
// WalkMode
|
||||||
|
bool RecvWalkModePacket();
|
||||||
|
|
||||||
|
// ChangeSkillGroup
|
||||||
|
bool RecvChangeSkillGroupPacket();
|
||||||
|
|
||||||
|
// Refine
|
||||||
|
bool RecvRefineInformationPacket();
|
||||||
|
bool RecvRefineInformationPacketNew();
|
||||||
|
|
||||||
|
// Use Potion
|
||||||
|
bool RecvSpecialEffect();
|
||||||
|
|
||||||
|
// 서버에서 지정한 이팩트 발동 패킷.
|
||||||
|
bool RecvSpecificEffect();
|
||||||
|
|
||||||
|
// 용혼석 관련
|
||||||
|
bool RecvDragonSoulRefine();
|
||||||
|
|
||||||
|
// MiniMap Info
|
||||||
|
bool RecvNPCList();
|
||||||
|
bool RecvLandPacket();
|
||||||
|
bool RecvTargetCreatePacket();
|
||||||
|
bool RecvTargetCreatePacketNew();
|
||||||
|
bool RecvTargetUpdatePacket();
|
||||||
|
bool RecvTargetDeletePacket();
|
||||||
|
|
||||||
|
// Affect
|
||||||
|
bool RecvAffectAddPacket();
|
||||||
|
bool RecvAffectRemovePacket();
|
||||||
|
|
||||||
|
// Channel
|
||||||
|
bool RecvChannelPacket();
|
||||||
|
|
||||||
|
//Security
|
||||||
|
bool RecvHSCheckRequest();
|
||||||
|
bool RecvXTrapVerifyRequest();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// 이모티콘
|
||||||
|
bool ParseEmoticon(const char * pChatMsg, DWORD * pdwEmoticon);
|
||||||
|
|
||||||
|
// 파이썬으로 보내는 콜들
|
||||||
|
void OnConnectFailure();
|
||||||
|
void OnScriptEventStart(int iSkin, int iIndex);
|
||||||
|
|
||||||
|
void OnRemoteDisconnect();
|
||||||
|
void OnDisconnect();
|
||||||
|
|
||||||
|
void SetGameOnline();
|
||||||
|
void SetGameOffline();
|
||||||
|
BOOL IsGameOnline();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool CheckPacket(TPacketHeader * pRetHeader);
|
||||||
|
|
||||||
|
void __InitializeGamePhase();
|
||||||
|
void __InitializeMarkAuth();
|
||||||
|
void __GlobalPositionToLocalPosition(LONG& rGlobalX, LONG& rGlobalY);
|
||||||
|
void __LocalPositionToGlobalPosition(LONG& rLocalX, LONG& rLocalY);
|
||||||
|
|
||||||
|
bool __IsPlayerAttacking();
|
||||||
|
bool __IsEquipItemInSlot(TItemPos Cell);
|
||||||
|
|
||||||
|
void __ShowMapName(LONG lLocalX, LONG lLocalY);
|
||||||
|
|
||||||
|
void __LeaveOfflinePhase() {}
|
||||||
|
void __LeaveHandshakePhase() {}
|
||||||
|
void __LeaveLoginPhase() {}
|
||||||
|
void __LeaveSelectPhase() {}
|
||||||
|
void __LeaveLoadingPhase() {}
|
||||||
|
void __LeaveGamePhase();
|
||||||
|
|
||||||
|
void __ClearNetworkActorManager();
|
||||||
|
|
||||||
|
void __ClearSelectCharacterData();
|
||||||
|
|
||||||
|
// DELETEME
|
||||||
|
//void __SendWarpPacket();
|
||||||
|
|
||||||
|
void __ConvertEmpireText(DWORD dwEmpireID, char* szText);
|
||||||
|
|
||||||
|
void __RecvCharacterAppendPacket(SNetworkActorData * pkNetActorData);
|
||||||
|
void __RecvCharacterUpdatePacket(SNetworkUpdateActorData * pkNetUpdateActorData);
|
||||||
|
|
||||||
|
void __FilterInsult(char* szLine, UINT uLineLen);
|
||||||
|
|
||||||
|
void __SetGuildID(DWORD id);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TPacketGCHandshake m_HandshakeData;
|
||||||
|
DWORD m_dwChangingPhaseTime;
|
||||||
|
DWORD m_dwBindupRetryCount;
|
||||||
|
DWORD m_dwMainActorVID;
|
||||||
|
DWORD m_dwMainActorRace;
|
||||||
|
DWORD m_dwMainActorEmpire;
|
||||||
|
DWORD m_dwMainActorSkillGroup;
|
||||||
|
BOOL m_isGameOnline;
|
||||||
|
BOOL m_isStartGame;
|
||||||
|
|
||||||
|
DWORD m_dwGuildID;
|
||||||
|
DWORD m_dwEmpireID;
|
||||||
|
|
||||||
|
struct SServerTimeSync
|
||||||
|
{
|
||||||
|
DWORD m_dwChangeServerTime;
|
||||||
|
DWORD m_dwChangeClientTime;
|
||||||
|
} m_kServerTimeSync;
|
||||||
|
|
||||||
|
void __ServerTimeSync_Initialize();
|
||||||
|
//DWORD m_dwBaseServerTime;
|
||||||
|
//DWORD m_dwBaseClientTime;
|
||||||
|
|
||||||
|
DWORD m_dwLastGamePingTime;
|
||||||
|
|
||||||
|
std::string m_stID;
|
||||||
|
std::string m_stPassword;
|
||||||
|
std::string m_strLastCommand;
|
||||||
|
std::string m_strPhase;
|
||||||
|
DWORD m_dwLoginKey;
|
||||||
|
BOOL m_isWaitLoginKey;
|
||||||
|
|
||||||
|
std::string m_stMarkIP;
|
||||||
|
|
||||||
|
CFuncObject<CPythonNetworkStream> m_phaseProcessFunc;
|
||||||
|
CFuncObject<CPythonNetworkStream> m_phaseLeaveFunc;
|
||||||
|
|
||||||
|
PyObject* m_poHandler;
|
||||||
|
PyObject* m_apoPhaseWnd[PHASE_WINDOW_NUM];
|
||||||
|
PyObject* m_poSerCommandParserWnd;
|
||||||
|
|
||||||
|
TSimplePlayerInformation m_akSimplePlayerInfo[PLAYER_PER_ACCOUNT4];
|
||||||
|
DWORD m_adwGuildID[PLAYER_PER_ACCOUNT4];
|
||||||
|
std::string m_astrGuildName[PLAYER_PER_ACCOUNT4];
|
||||||
|
bool m_bSimplePlayerInfo;
|
||||||
|
|
||||||
|
CRef<CNetworkActorManager> m_rokNetActorMgr;
|
||||||
|
|
||||||
|
bool m_isRefreshStatus;
|
||||||
|
bool m_isRefreshCharacterWnd;
|
||||||
|
bool m_isRefreshEquipmentWnd;
|
||||||
|
bool m_isRefreshInventoryWnd;
|
||||||
|
bool m_isRefreshExchangeWnd;
|
||||||
|
bool m_isRefreshSkillWnd;
|
||||||
|
bool m_isRefreshSafeboxWnd;
|
||||||
|
bool m_isRefreshMallWnd;
|
||||||
|
bool m_isRefreshMessengerWnd;
|
||||||
|
bool m_isRefreshGuildWndInfoPage;
|
||||||
|
bool m_isRefreshGuildWndBoardPage;
|
||||||
|
bool m_isRefreshGuildWndMemberPage;
|
||||||
|
bool m_isRefreshGuildWndMemberPageGradeComboBox;
|
||||||
|
bool m_isRefreshGuildWndSkillPage;
|
||||||
|
bool m_isRefreshGuildWndGradePage;
|
||||||
|
|
||||||
|
// Emoticon
|
||||||
|
std::vector<std::string> m_EmoticonStringVector;
|
||||||
|
|
||||||
|
struct STextConvertTable
|
||||||
|
{
|
||||||
|
char acUpper[26];
|
||||||
|
char acLower[26];
|
||||||
|
BYTE aacHan[5000][2];
|
||||||
|
} m_aTextConvTable[3];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
struct SMarkAuth
|
||||||
|
{
|
||||||
|
CNetworkAddress m_kNetAddr;
|
||||||
|
DWORD m_dwHandle;
|
||||||
|
DWORD m_dwRandomKey;
|
||||||
|
} m_kMarkAuth;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DWORD m_dwSelectedCharacterIndex;
|
||||||
|
|
||||||
|
CInsultChecker m_kInsultChecker;
|
||||||
|
|
||||||
|
bool m_isEnableChatInsultFilter;
|
||||||
|
bool m_bComboSkillFlag;
|
||||||
|
|
||||||
|
std::deque<std::string> m_kQue_stHack;
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct SDirectEnterMode
|
||||||
|
{
|
||||||
|
bool m_isSet;
|
||||||
|
DWORD m_dwChrSlotIndex;
|
||||||
|
} m_kDirectEnterMode;
|
||||||
|
|
||||||
|
void __DirectEnterMode_Initialize();
|
||||||
|
void __DirectEnterMode_Set(UINT uChrSlotIndex);
|
||||||
|
bool __DirectEnterMode_IsSet();
|
||||||
|
|
||||||
|
public:
|
||||||
|
DWORD EXPORT_GetBettingGuildWarValue(const char* c_szValueName);
|
||||||
|
|
||||||
|
private:
|
||||||
|
struct SBettingGuildWar
|
||||||
|
{
|
||||||
|
DWORD m_dwBettingMoney;
|
||||||
|
DWORD m_dwObserverCount;
|
||||||
|
} m_kBettingGuildWar;
|
||||||
|
|
||||||
|
CInstanceBase * m_pInstTarget;
|
||||||
|
|
||||||
|
void __BettingGuildWar_Initialize();
|
||||||
|
void __BettingGuildWar_SetObserverCount(UINT uObserverCount);
|
||||||
|
void __BettingGuildWar_SetBettingMoney(UINT uBettingMoney);
|
||||||
|
};
|
||||||
@@ -0,0 +1,142 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NPC 데이터 프로토 타잎을 관리 한다.
|
||||||
|
*/
|
||||||
|
class CPythonNonPlayer : public CSingleton<CPythonNonPlayer>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum EClickEvent
|
||||||
|
{
|
||||||
|
ON_CLICK_EVENT_NONE = 0,
|
||||||
|
ON_CLICK_EVENT_BATTLE = 1,
|
||||||
|
ON_CLICK_EVENT_SHOP = 2,
|
||||||
|
ON_CLICK_EVENT_TALK = 3,
|
||||||
|
ON_CLICK_EVENT_VEHICLE = 4,
|
||||||
|
|
||||||
|
ON_CLICK_EVENT_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EMobEnchants
|
||||||
|
{
|
||||||
|
MOB_ENCHANT_CURSE,
|
||||||
|
MOB_ENCHANT_SLOW,
|
||||||
|
MOB_ENCHANT_POISON,
|
||||||
|
MOB_ENCHANT_STUN,
|
||||||
|
MOB_ENCHANT_CRITICAL,
|
||||||
|
MOB_ENCHANT_PENETRATE,
|
||||||
|
MOB_ENCHANTS_MAX_NUM
|
||||||
|
};
|
||||||
|
enum EMobResists
|
||||||
|
{
|
||||||
|
MOB_RESIST_SWORD,
|
||||||
|
MOB_RESIST_TWOHAND,
|
||||||
|
MOB_RESIST_DAGGER,
|
||||||
|
MOB_RESIST_BELL,
|
||||||
|
MOB_RESIST_FAN,
|
||||||
|
MOB_RESIST_BOW,
|
||||||
|
MOB_RESIST_FIRE,
|
||||||
|
MOB_RESIST_ELECT,
|
||||||
|
MOB_RESIST_MAGIC,
|
||||||
|
MOB_RESIST_WIND,
|
||||||
|
MOB_RESIST_POISON,
|
||||||
|
MOB_RESISTS_MAX_NUM
|
||||||
|
};
|
||||||
|
|
||||||
|
#define MOB_ATTRIBUTE_MAX_NUM 12
|
||||||
|
#define MOB_SKILL_MAX_NUM 5
|
||||||
|
|
||||||
|
#pragma pack(push)
|
||||||
|
#pragma pack(1)
|
||||||
|
typedef struct SMobSkillLevel
|
||||||
|
{
|
||||||
|
DWORD dwVnum;
|
||||||
|
BYTE bLevel;
|
||||||
|
} TMobSkillLevel;
|
||||||
|
|
||||||
|
typedef struct SMobTable
|
||||||
|
{
|
||||||
|
DWORD dwVnum;
|
||||||
|
char szName[CHARACTER_NAME_MAX_LEN + 1];
|
||||||
|
char szLocaleName[CHARACTER_NAME_MAX_LEN + 1];
|
||||||
|
|
||||||
|
BYTE bType; // Monster, NPC
|
||||||
|
BYTE bRank; // PAWN, KNIGHT, KING
|
||||||
|
BYTE bBattleType; // MELEE, etc..
|
||||||
|
BYTE bLevel; // Level
|
||||||
|
BYTE bSize;
|
||||||
|
|
||||||
|
DWORD dwGoldMin;
|
||||||
|
DWORD dwGoldMax;
|
||||||
|
DWORD dwExp;
|
||||||
|
DWORD dwMaxHP;
|
||||||
|
BYTE bRegenCycle;
|
||||||
|
BYTE bRegenPercent;
|
||||||
|
WORD wDef;
|
||||||
|
|
||||||
|
DWORD dwAIFlag;
|
||||||
|
DWORD dwRaceFlag;
|
||||||
|
DWORD dwImmuneFlag;
|
||||||
|
|
||||||
|
BYTE bStr, bDex, bCon, bInt;
|
||||||
|
DWORD dwDamageRange[2];
|
||||||
|
|
||||||
|
short sAttackSpeed;
|
||||||
|
short sMovingSpeed;
|
||||||
|
BYTE bAggresiveHPPct;
|
||||||
|
WORD wAggressiveSight;
|
||||||
|
WORD wAttackRange;
|
||||||
|
|
||||||
|
char cEnchants[MOB_ENCHANTS_MAX_NUM];
|
||||||
|
char cResists[MOB_RESISTS_MAX_NUM];
|
||||||
|
|
||||||
|
DWORD dwResurrectionVnum;
|
||||||
|
DWORD dwDropItemVnum;
|
||||||
|
|
||||||
|
BYTE bMountCapacity;
|
||||||
|
BYTE bOnClickType;
|
||||||
|
|
||||||
|
BYTE bEmpire;
|
||||||
|
char szFolder[64 + 1];
|
||||||
|
float fDamMultiply;
|
||||||
|
DWORD dwSummonVnum;
|
||||||
|
DWORD dwDrainSP;
|
||||||
|
DWORD dwMonsterColor;
|
||||||
|
DWORD dwPolymorphItemVnum;
|
||||||
|
|
||||||
|
TMobSkillLevel Skills[MOB_SKILL_MAX_NUM];
|
||||||
|
|
||||||
|
BYTE bBerserkPoint;
|
||||||
|
BYTE bStoneSkinPoint;
|
||||||
|
BYTE bGodSpeedPoint;
|
||||||
|
BYTE bDeathBlowPoint;
|
||||||
|
BYTE bRevivePoint;
|
||||||
|
} TMobTable;
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
|
typedef std::list<TMobTable *> TMobTableList;
|
||||||
|
typedef std::map<DWORD, TMobTable *> TNonPlayerDataMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonNonPlayer(void);
|
||||||
|
virtual ~CPythonNonPlayer(void);
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
|
bool LoadNonPlayerData(const char * c_szFileName);
|
||||||
|
|
||||||
|
const TMobTable * GetTable(DWORD dwVnum);
|
||||||
|
bool GetName(DWORD dwVnum, const char ** c_pszName);
|
||||||
|
bool GetInstanceType(DWORD dwVnum, BYTE* pbType);
|
||||||
|
BYTE GetEventType(DWORD dwVnum);
|
||||||
|
BYTE GetEventTypeByVID(DWORD dwVID);
|
||||||
|
DWORD GetMonsterColor(DWORD dwVnum);
|
||||||
|
const char* GetMonsterName(DWORD dwVnum);
|
||||||
|
|
||||||
|
// Function for outer
|
||||||
|
void GetMatchableMobList(int iLevel, int iInterval, TMobTableList * pMobTableList);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TNonPlayerDataMap m_NonPlayerDataMap;
|
||||||
|
};
|
||||||
@@ -0,0 +1,689 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AbstractPlayer.h"
|
||||||
|
#include "Packet.h"
|
||||||
|
#include "PythonSkill.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 메인 캐릭터 (자신이 조정하는 캐릭터) 가 가진 정보들을 관리한다.
|
||||||
|
*
|
||||||
|
* 2003-01-12 Levites 본래는 CPythonCharacter가 가지고 있었지만 규모가 너무 커져 버린데다
|
||||||
|
* 위치도 애매해서 따로 분리
|
||||||
|
* 2003-07-19 Levites 메인 캐릭터의 이동 처리 CharacterInstance에서 떼어다 붙임
|
||||||
|
* 기존의 데이타 보존의 역할에서 완벽한 메인 플레이어 제어 클래스로
|
||||||
|
* 탈바꿈 함.
|
||||||
|
*/
|
||||||
|
|
||||||
|
class CPythonPlayer : public CSingleton<CPythonPlayer>, public IAbstractPlayer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
CATEGORY_NONE = 0,
|
||||||
|
CATEGORY_ACTIVE = 1,
|
||||||
|
CATEGORY_PASSIVE = 2,
|
||||||
|
CATEGORY_MAX_NUM = 3,
|
||||||
|
|
||||||
|
STATUS_INDEX_ST = 1,
|
||||||
|
STATUS_INDEX_DX = 2,
|
||||||
|
STATUS_INDEX_IQ = 3,
|
||||||
|
STATUS_INDEX_HT = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MBT_LEFT,
|
||||||
|
MBT_RIGHT,
|
||||||
|
MBT_MIDDLE,
|
||||||
|
MBT_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MBF_SMART,
|
||||||
|
MBF_MOVE,
|
||||||
|
MBF_CAMERA,
|
||||||
|
MBF_ATTACK,
|
||||||
|
MBF_SKILL,
|
||||||
|
MBF_AUTO,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
MBS_CLICK,
|
||||||
|
MBS_PRESS,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EMode
|
||||||
|
{
|
||||||
|
MODE_NONE,
|
||||||
|
MODE_CLICK_POSITION,
|
||||||
|
MODE_CLICK_ITEM,
|
||||||
|
MODE_CLICK_ACTOR,
|
||||||
|
MODE_USE_SKILL,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EEffect
|
||||||
|
{
|
||||||
|
EFFECT_PICK,
|
||||||
|
EFFECT_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EMetinSocketType
|
||||||
|
{
|
||||||
|
METIN_SOCKET_TYPE_NONE,
|
||||||
|
METIN_SOCKET_TYPE_SILVER,
|
||||||
|
METIN_SOCKET_TYPE_GOLD,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SSkillInstance
|
||||||
|
{
|
||||||
|
DWORD dwIndex;
|
||||||
|
int iType;
|
||||||
|
int iGrade;
|
||||||
|
int iLevel;
|
||||||
|
float fcurEfficientPercentage;
|
||||||
|
float fnextEfficientPercentage;
|
||||||
|
BOOL isCoolTime;
|
||||||
|
|
||||||
|
float fCoolTime; // NOTE : 쿨타임 중인 스킬 슬롯을
|
||||||
|
float fLastUsedTime; // 퀵창에 등록할 때 사용하는 변수
|
||||||
|
BOOL bActive;
|
||||||
|
} TSkillInstance;
|
||||||
|
|
||||||
|
enum EKeyBoard_UD
|
||||||
|
{
|
||||||
|
KEYBOARD_UD_NONE,
|
||||||
|
KEYBOARD_UD_UP,
|
||||||
|
KEYBOARD_UD_DOWN,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EKeyBoard_LR
|
||||||
|
{
|
||||||
|
KEYBOARD_LR_NONE,
|
||||||
|
KEYBOARD_LR_LEFT,
|
||||||
|
KEYBOARD_LR_RIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
DIR_UP,
|
||||||
|
DIR_DOWN,
|
||||||
|
DIR_LEFT,
|
||||||
|
DIR_RIGHT,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SPlayerStatus
|
||||||
|
{
|
||||||
|
TItemData aItem[c_Inventory_Count];
|
||||||
|
TItemData aDSItem[c_DragonSoul_Inventory_Count];
|
||||||
|
TQuickSlot aQuickSlot[QUICKSLOT_MAX_NUM];
|
||||||
|
TSkillInstance aSkill[SKILL_MAX_NUM];
|
||||||
|
long m_alPoint[POINT_MAX_NUM];
|
||||||
|
long lQuickPageIndex;
|
||||||
|
|
||||||
|
void SetPoint(UINT ePoint, long lPoint);
|
||||||
|
long GetPoint(UINT ePoint);
|
||||||
|
} TPlayerStatus;
|
||||||
|
|
||||||
|
typedef struct SPartyMemberInfo
|
||||||
|
{
|
||||||
|
SPartyMemberInfo(DWORD _dwPID, const char * c_szName) : dwPID(_dwPID), strName(c_szName), dwVID(0) {}
|
||||||
|
|
||||||
|
DWORD dwVID;
|
||||||
|
DWORD dwPID;
|
||||||
|
std::string strName;
|
||||||
|
BYTE byState;
|
||||||
|
BYTE byHPPercentage;
|
||||||
|
short sAffects[PARTY_AFFECT_SLOT_MAX_NUM];
|
||||||
|
} TPartyMemberInfo;
|
||||||
|
|
||||||
|
enum EPartyRole
|
||||||
|
{
|
||||||
|
PARTY_ROLE_NORMAL,
|
||||||
|
PARTY_ROLE_LEADER,
|
||||||
|
PARTY_ROLE_ATTACKER,
|
||||||
|
PARTY_ROLE_TANKER,
|
||||||
|
PARTY_ROLE_BUFFER,
|
||||||
|
PARTY_ROLE_SKILL_MASTER,
|
||||||
|
PARTY_ROLE_BERSERKER,
|
||||||
|
PARTY_ROLE_DEFENDER,
|
||||||
|
PARTY_ROLE_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SKILL_NORMAL,
|
||||||
|
SKILL_MASTER,
|
||||||
|
SKILL_GRAND_MASTER,
|
||||||
|
SKILL_PERFECT_MASTER,
|
||||||
|
};
|
||||||
|
|
||||||
|
// 자동물약 상태 관련 특화 구조체.. 이런식의 특화 처리 작업을 안 하려고 최대한 노력했지만 실패하고 결국 특화처리.
|
||||||
|
struct SAutoPotionInfo
|
||||||
|
{
|
||||||
|
SAutoPotionInfo() : bActivated(false), totalAmount(0), currentAmount(0) {}
|
||||||
|
|
||||||
|
bool bActivated; // 활성화 되었는가?
|
||||||
|
long currentAmount; // 현재 남은 양
|
||||||
|
long totalAmount; // 전체 양
|
||||||
|
long inventorySlotIndex; // 사용중인 아이템의 인벤토리상 슬롯 인덱스
|
||||||
|
};
|
||||||
|
|
||||||
|
enum EAutoPotionType
|
||||||
|
{
|
||||||
|
AUTO_POTION_TYPE_HP = 0,
|
||||||
|
AUTO_POTION_TYPE_SP = 1,
|
||||||
|
AUTO_POTION_TYPE_NUM
|
||||||
|
};
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonPlayer(void);
|
||||||
|
virtual ~CPythonPlayer(void);
|
||||||
|
|
||||||
|
void PickCloseMoney();
|
||||||
|
void PickCloseItem();
|
||||||
|
|
||||||
|
void SetGameWindow(PyObject * ppyObject);
|
||||||
|
|
||||||
|
void SetObserverMode(bool isEnable);
|
||||||
|
bool IsObserverMode();
|
||||||
|
|
||||||
|
void SetQuickCameraMode(bool isEnable);
|
||||||
|
|
||||||
|
void SetAttackKeyState(bool isPress);
|
||||||
|
|
||||||
|
void NEW_GetMainActorPosition(TPixelPosition* pkPPosActor);
|
||||||
|
|
||||||
|
bool RegisterEffect(DWORD dwEID, const char* c_szEftFileName, bool isCache);
|
||||||
|
|
||||||
|
bool NEW_SetMouseState(int eMBType, int eMBState);
|
||||||
|
bool NEW_SetMouseFunc(int eMBType, int eMBFunc);
|
||||||
|
int NEW_GetMouseFunc(int eMBT);
|
||||||
|
void NEW_SetMouseMiddleButtonState(int eMBState);
|
||||||
|
|
||||||
|
void NEW_SetAutoCameraRotationSpeed(float fRotSpd);
|
||||||
|
void NEW_ResetCameraRotation();
|
||||||
|
|
||||||
|
void NEW_SetSingleDirKeyState(int eDirKey, bool isPress);
|
||||||
|
void NEW_SetSingleDIKKeyState(int eDIKKey, bool isPress);
|
||||||
|
void NEW_SetMultiDirKeyState(bool isLeft, bool isRight, bool isUp, bool isDown);
|
||||||
|
|
||||||
|
void NEW_Attack();
|
||||||
|
void NEW_Fishing();
|
||||||
|
bool NEW_CancelFishing();
|
||||||
|
|
||||||
|
void NEW_LookAtFocusActor();
|
||||||
|
bool NEW_IsAttackableDistanceFocusActor();
|
||||||
|
|
||||||
|
|
||||||
|
bool NEW_MoveToDestPixelPositionDirection(const TPixelPosition& c_rkPPosDst);
|
||||||
|
bool NEW_MoveToMousePickedDirection();
|
||||||
|
bool NEW_MoveToMouseScreenDirection();
|
||||||
|
bool NEW_MoveToDirection(float fDirRot);
|
||||||
|
void NEW_Stop();
|
||||||
|
|
||||||
|
|
||||||
|
// Reserved
|
||||||
|
bool NEW_IsEmptyReservedDelayTime(float fElapsedtime); // 네이밍 교정 논의 필요 - [levites]
|
||||||
|
|
||||||
|
|
||||||
|
// Dungeon
|
||||||
|
void SetDungeonDestinationPosition(int ix, int iy);
|
||||||
|
void AlarmHaveToGo();
|
||||||
|
|
||||||
|
|
||||||
|
CInstanceBase* NEW_FindActorPtr(DWORD dwVID);
|
||||||
|
CInstanceBase* NEW_GetMainActorPtr();
|
||||||
|
|
||||||
|
// flying target set
|
||||||
|
void Clear();
|
||||||
|
void ClearSkillDict(); // 없어지거나 ClearGame 쪽으로 포함될 함수
|
||||||
|
void NEW_ClearSkillData(bool bAll = false);
|
||||||
|
|
||||||
|
void Update();
|
||||||
|
|
||||||
|
|
||||||
|
// Play Time
|
||||||
|
DWORD GetPlayTime();
|
||||||
|
void SetPlayTime(DWORD dwPlayTime);
|
||||||
|
|
||||||
|
|
||||||
|
// System
|
||||||
|
void SetMainCharacterIndex(int iIndex);
|
||||||
|
|
||||||
|
DWORD GetMainCharacterIndex();
|
||||||
|
bool IsMainCharacterIndex(DWORD dwIndex);
|
||||||
|
DWORD GetGuildID();
|
||||||
|
void NotifyDeletingCharacterInstance(DWORD dwVID);
|
||||||
|
void NotifyCharacterDead(DWORD dwVID);
|
||||||
|
void NotifyCharacterUpdate(DWORD dwVID);
|
||||||
|
void NotifyDeadMainCharacter();
|
||||||
|
void NotifyChangePKMode();
|
||||||
|
|
||||||
|
|
||||||
|
// Player Status
|
||||||
|
const char * GetName();
|
||||||
|
void SetName(const char *name);
|
||||||
|
|
||||||
|
void SetRace(DWORD dwRace);
|
||||||
|
DWORD GetRace();
|
||||||
|
|
||||||
|
void SetWeaponPower(DWORD dwMinPower, DWORD dwMaxPower, DWORD dwMinMagicPower, DWORD dwMaxMagicPower, DWORD dwAddPower);
|
||||||
|
void SetStatus(DWORD dwType, long lValue);
|
||||||
|
int GetStatus(DWORD dwType);
|
||||||
|
|
||||||
|
|
||||||
|
// Item
|
||||||
|
void MoveItemData(TItemPos SrcCell, TItemPos DstCell);
|
||||||
|
void SetItemData(TItemPos Cell, const TItemData & c_rkItemInst);
|
||||||
|
const TItemData * GetItemData(TItemPos Cell) const;
|
||||||
|
void SetItemCount(TItemPos Cell, BYTE byCount);
|
||||||
|
void SetItemMetinSocket(TItemPos Cell, DWORD dwMetinSocketIndex, DWORD dwMetinNumber);
|
||||||
|
void SetItemAttribute(TItemPos Cell, DWORD dwAttrIndex, BYTE byType, short sValue);
|
||||||
|
DWORD GetItemIndex(TItemPos Cell);
|
||||||
|
DWORD GetItemFlags(TItemPos Cell);
|
||||||
|
DWORD GetItemCount(TItemPos Cell);
|
||||||
|
DWORD GetItemCountByVnum(DWORD dwVnum);
|
||||||
|
DWORD GetItemMetinSocket(TItemPos Cell, DWORD dwMetinSocketIndex);
|
||||||
|
void GetItemAttribute(TItemPos Cell, DWORD dwAttrSlotIndex, BYTE * pbyType, short * psValue);
|
||||||
|
void SendClickItemPacket(DWORD dwIID);
|
||||||
|
|
||||||
|
void RequestAddLocalQuickSlot(DWORD dwLocalSlotIndex, DWORD dwWndType, DWORD dwWndItemPos);
|
||||||
|
void RequestAddToEmptyLocalQuickSlot(DWORD dwWndType, DWORD dwWndItemPos);
|
||||||
|
void RequestMoveGlobalQuickSlotToLocalQuickSlot(DWORD dwGlobalSrcSlotIndex, DWORD dwLocalDstSlotIndex);
|
||||||
|
void RequestDeleteGlobalQuickSlot(DWORD dwGlobalSlotIndex);
|
||||||
|
void RequestUseLocalQuickSlot(DWORD dwLocalSlotIndex);
|
||||||
|
DWORD LocalQuickSlotIndexToGlobalQuickSlotIndex(DWORD dwLocalSlotIndex);
|
||||||
|
|
||||||
|
void GetGlobalQuickSlotData(DWORD dwGlobalSlotIndex, DWORD* pdwWndType, DWORD* pdwWndItemPos);
|
||||||
|
void GetLocalQuickSlotData(DWORD dwSlotPos, DWORD* pdwWndType, DWORD* pdwWndItemPos);
|
||||||
|
void RemoveQuickSlotByValue(int iType, int iPosition);
|
||||||
|
|
||||||
|
char IsItem(TItemPos SlotIndex);
|
||||||
|
|
||||||
|
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
|
bool IsBeltInventorySlot(TItemPos Cell);
|
||||||
|
#endif
|
||||||
|
bool IsInventorySlot(TItemPos SlotIndex);
|
||||||
|
bool IsEquipmentSlot(TItemPos SlotIndex);
|
||||||
|
|
||||||
|
bool IsEquipItemInSlot(TItemPos iSlotIndex);
|
||||||
|
|
||||||
|
|
||||||
|
// Quickslot
|
||||||
|
int GetQuickPage();
|
||||||
|
void SetQuickPage(int nPageIndex);
|
||||||
|
void AddQuickSlot(int QuickslotIndex, char IconType, char IconPosition);
|
||||||
|
void DeleteQuickSlot(int QuickslotIndex);
|
||||||
|
void MoveQuickSlot(int Source, int Target);
|
||||||
|
|
||||||
|
|
||||||
|
// Skill
|
||||||
|
void SetSkill(DWORD dwSlotIndex, DWORD dwSkillIndex);
|
||||||
|
bool GetSkillSlotIndex(DWORD dwSkillIndex, DWORD* pdwSlotIndex);
|
||||||
|
int GetSkillIndex(DWORD dwSlotIndex);
|
||||||
|
int GetSkillGrade(DWORD dwSlotIndex);
|
||||||
|
int GetSkillLevel(DWORD dwSlotIndex);
|
||||||
|
float GetSkillCurrentEfficientPercentage(DWORD dwSlotIndex);
|
||||||
|
float GetSkillNextEfficientPercentage(DWORD dwSlotIndex);
|
||||||
|
void SetSkillLevel(DWORD dwSlotIndex, DWORD dwSkillLevel);
|
||||||
|
void SetSkillLevel_(DWORD dwSkillIndex, DWORD dwSkillGrade, DWORD dwSkillLevel);
|
||||||
|
BOOL IsToggleSkill(DWORD dwSlotIndex);
|
||||||
|
void ClickSkillSlot(DWORD dwSlotIndex);
|
||||||
|
void ChangeCurrentSkillNumberOnly(DWORD dwSlotIndex);
|
||||||
|
bool FindSkillSlotIndexBySkillIndex(DWORD dwSkillIndex, DWORD * pdwSkillSlotIndex);
|
||||||
|
|
||||||
|
void SetSkillCoolTime(DWORD dwSkillIndex);
|
||||||
|
void EndSkillCoolTime(DWORD dwSkillIndex);
|
||||||
|
|
||||||
|
float GetSkillCoolTime(DWORD dwSlotIndex);
|
||||||
|
float GetSkillElapsedCoolTime(DWORD dwSlotIndex);
|
||||||
|
BOOL IsSkillActive(DWORD dwSlotIndex);
|
||||||
|
BOOL IsSkillCoolTime(DWORD dwSlotIndex);
|
||||||
|
void UseGuildSkill(DWORD dwSkillSlotIndex);
|
||||||
|
bool AffectIndexToSkillSlotIndex(UINT uAffect, DWORD* pdwSkillSlotIndex);
|
||||||
|
bool AffectIndexToSkillIndex(DWORD dwAffectIndex, DWORD * pdwSkillIndex);
|
||||||
|
|
||||||
|
void SetAffect(UINT uAffect);
|
||||||
|
void ResetAffect(UINT uAffect);
|
||||||
|
void ClearAffects();
|
||||||
|
|
||||||
|
|
||||||
|
// Target
|
||||||
|
void SetTarget(DWORD dwVID, BOOL bForceChange = TRUE);
|
||||||
|
void OpenCharacterMenu(DWORD dwVictimActorID);
|
||||||
|
DWORD GetTargetVID();
|
||||||
|
|
||||||
|
|
||||||
|
// Party
|
||||||
|
void ExitParty();
|
||||||
|
void AppendPartyMember(DWORD dwPID, const char * c_szName);
|
||||||
|
void LinkPartyMember(DWORD dwPID, DWORD dwVID);
|
||||||
|
void UnlinkPartyMember(DWORD dwPID);
|
||||||
|
void UpdatePartyMemberInfo(DWORD dwPID, BYTE byState, BYTE byHPPercentage);
|
||||||
|
void UpdatePartyMemberAffect(DWORD dwPID, BYTE byAffectSlotIndex, short sAffectNumber);
|
||||||
|
void RemovePartyMember(DWORD dwPID);
|
||||||
|
bool IsPartyMemberByVID(DWORD dwVID);
|
||||||
|
bool IsPartyMemberByName(const char * c_szName);
|
||||||
|
bool GetPartyMemberPtr(DWORD dwPID, TPartyMemberInfo ** ppPartyMemberInfo);
|
||||||
|
bool PartyMemberPIDToVID(DWORD dwPID, DWORD * pdwVID);
|
||||||
|
bool PartyMemberVIDToPID(DWORD dwVID, DWORD * pdwPID);
|
||||||
|
bool IsSamePartyMember(DWORD dwVID1, DWORD dwVID2);
|
||||||
|
|
||||||
|
|
||||||
|
// Fight
|
||||||
|
void RememberChallengeInstance(DWORD dwVID);
|
||||||
|
void RememberRevengeInstance(DWORD dwVID);
|
||||||
|
void RememberCantFightInstance(DWORD dwVID);
|
||||||
|
void ForgetInstance(DWORD dwVID);
|
||||||
|
bool IsChallengeInstance(DWORD dwVID);
|
||||||
|
bool IsRevengeInstance(DWORD dwVID);
|
||||||
|
bool IsCantFightInstance(DWORD dwVID);
|
||||||
|
|
||||||
|
|
||||||
|
// Private Shop
|
||||||
|
void OpenPrivateShop();
|
||||||
|
void ClosePrivateShop();
|
||||||
|
bool IsOpenPrivateShop();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Stamina
|
||||||
|
void StartStaminaConsume(DWORD dwConsumePerSec, DWORD dwCurrentStamina);
|
||||||
|
void StopStaminaConsume(DWORD dwCurrentStamina);
|
||||||
|
|
||||||
|
|
||||||
|
// PK Mode
|
||||||
|
DWORD GetPKMode();
|
||||||
|
|
||||||
|
|
||||||
|
// Mobile
|
||||||
|
void SetMobileFlag(BOOL bFlag);
|
||||||
|
BOOL HasMobilePhoneNumber();
|
||||||
|
|
||||||
|
|
||||||
|
// Combo
|
||||||
|
void SetComboSkillFlag(BOOL bFlag);
|
||||||
|
|
||||||
|
|
||||||
|
// System
|
||||||
|
void SetMovableGroundDistance(float fDistance);
|
||||||
|
|
||||||
|
|
||||||
|
// Emotion
|
||||||
|
void ActEmotion(DWORD dwEmotionID);
|
||||||
|
void StartEmotionProcess();
|
||||||
|
void EndEmotionProcess();
|
||||||
|
|
||||||
|
|
||||||
|
// Function Only For Console System
|
||||||
|
BOOL __ToggleCoolTime();
|
||||||
|
BOOL __ToggleLevelLimit();
|
||||||
|
|
||||||
|
__inline const SAutoPotionInfo& GetAutoPotionInfo(int type) const { return m_kAutoPotionInfo[type]; }
|
||||||
|
__inline SAutoPotionInfo& GetAutoPotionInfo(int type) { return m_kAutoPotionInfo[type]; }
|
||||||
|
__inline void SetAutoPotionInfo(int type, const SAutoPotionInfo& info) { m_kAutoPotionInfo[type] = info; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TQuickSlot & __RefLocalQuickSlot(int SlotIndex);
|
||||||
|
TQuickSlot & __RefGlobalQuickSlot(int SlotIndex);
|
||||||
|
|
||||||
|
|
||||||
|
DWORD __GetLevelAtk();
|
||||||
|
DWORD __GetStatAtk();
|
||||||
|
DWORD __GetWeaponAtk(DWORD dwWeaponPower);
|
||||||
|
DWORD __GetTotalAtk(DWORD dwWeaponPower, DWORD dwRefineBonus);
|
||||||
|
DWORD __GetRaceStat();
|
||||||
|
DWORD __GetHitRate();
|
||||||
|
DWORD __GetEvadeRate();
|
||||||
|
|
||||||
|
void __UpdateBattleStatus();
|
||||||
|
|
||||||
|
void __DeactivateSkillSlot(DWORD dwSlotIndex);
|
||||||
|
void __ActivateSkillSlot(DWORD dwSlotIndex);
|
||||||
|
|
||||||
|
void __OnPressSmart(CInstanceBase& rkInstMain, bool isAuto);
|
||||||
|
void __OnClickSmart(CInstanceBase& rkInstMain, bool isAuto);
|
||||||
|
|
||||||
|
void __OnPressItem(CInstanceBase& rkInstMain, DWORD dwPickedItemID);
|
||||||
|
void __OnPressActor(CInstanceBase& rkInstMain, DWORD dwPickedActorID, bool isAuto);
|
||||||
|
void __OnPressGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround);
|
||||||
|
void __OnPressScreen(CInstanceBase& rkInstMain);
|
||||||
|
|
||||||
|
void __OnClickActor(CInstanceBase& rkInstMain, DWORD dwPickedActorID, bool isAuto);
|
||||||
|
void __OnClickItem(CInstanceBase& rkInstMain, DWORD dwPickedItemID);
|
||||||
|
void __OnClickGround(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround);
|
||||||
|
|
||||||
|
bool __IsMovableGroundDistance(CInstanceBase& rkInstMain, const TPixelPosition& c_rkPPosPickedGround);
|
||||||
|
|
||||||
|
bool __GetPickedActorPtr(CInstanceBase** pkInstPicked);
|
||||||
|
|
||||||
|
bool __GetPickedActorID(DWORD* pdwActorID);
|
||||||
|
bool __GetPickedItemID(DWORD* pdwItemID);
|
||||||
|
bool __GetPickedGroundPos(TPixelPosition* pkPPosPicked);
|
||||||
|
|
||||||
|
void __ClearReservedAction();
|
||||||
|
void __ReserveClickItem(DWORD dwItemID);
|
||||||
|
void __ReserveClickActor(DWORD dwActorID);
|
||||||
|
void __ReserveClickGround(const TPixelPosition& c_rkPPosPickedGround);
|
||||||
|
void __ReserveUseSkill(DWORD dwActorID, DWORD dwSkillSlotIndex, DWORD dwRange);
|
||||||
|
|
||||||
|
void __ReserveProcess_ClickActor();
|
||||||
|
|
||||||
|
void __ShowPickedEffect(const TPixelPosition& c_rkPPosPickedGround);
|
||||||
|
void __SendClickActorPacket(CInstanceBase& rkInstVictim);
|
||||||
|
|
||||||
|
void __ClearAutoAttackTargetActorID();
|
||||||
|
void __SetAutoAttackTargetActorID(DWORD dwActorID);
|
||||||
|
|
||||||
|
void NEW_ShowEffect(int dwEID, TPixelPosition kPPosDst);
|
||||||
|
|
||||||
|
void NEW_SetMouseSmartState(int eMBS, bool isAuto);
|
||||||
|
void NEW_SetMouseMoveState(int eMBS);
|
||||||
|
void NEW_SetMouseCameraState(int eMBS);
|
||||||
|
void NEW_GetMouseDirRotation(float fScrX, float fScrY, float* pfDirRot);
|
||||||
|
void NEW_GetMultiKeyDirRotation(bool isLeft, bool isRight, bool isUp, bool isDown, float* pfDirRot);
|
||||||
|
|
||||||
|
float GetDegreeFromDirection(int iUD, int iLR);
|
||||||
|
float GetDegreeFromPosition(int ix, int iy, int iHalfWidth, int iHalfHeight);
|
||||||
|
|
||||||
|
bool CheckCategory(int iCategory);
|
||||||
|
bool CheckAbilitySlot(int iSlotIndex);
|
||||||
|
|
||||||
|
void RefreshKeyWalkingDirection();
|
||||||
|
void NEW_RefreshMouseWalkingDirection();
|
||||||
|
|
||||||
|
|
||||||
|
// Instances
|
||||||
|
void RefreshInstances();
|
||||||
|
|
||||||
|
bool __CanShot(CInstanceBase& rkInstMain, CInstanceBase& rkInstTarget);
|
||||||
|
bool __CanUseSkill();
|
||||||
|
|
||||||
|
bool __CanMove();
|
||||||
|
|
||||||
|
bool __CanAttack();
|
||||||
|
bool __CanChangeTarget();
|
||||||
|
|
||||||
|
bool __CheckSkillUsable(DWORD dwSlotIndex);
|
||||||
|
void __UseCurrentSkill();
|
||||||
|
void __UseChargeSkill(DWORD dwSkillSlotIndex);
|
||||||
|
bool __UseSkill(DWORD dwSlotIndex);
|
||||||
|
bool __CheckSpecialSkill(DWORD dwSkillIndex);
|
||||||
|
|
||||||
|
bool __CheckRestSkillCoolTime(DWORD dwSkillSlotIndex);
|
||||||
|
bool __CheckShortLife(TSkillInstance & rkSkillInst, CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
bool __CheckShortMana(TSkillInstance & rkSkillInst, CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
bool __CheckShortArrow(TSkillInstance & rkSkillInst, CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
bool __CheckDashAffect(CInstanceBase& rkInstMain);
|
||||||
|
|
||||||
|
void __SendUseSkill(DWORD dwSkillSlotIndex, DWORD dwTargetVID);
|
||||||
|
void __RunCoolTime(DWORD dwSkillSlotIndex);
|
||||||
|
|
||||||
|
BYTE __GetSkillType(DWORD dwSkillSlotIndex);
|
||||||
|
|
||||||
|
bool __IsReservedUseSkill(DWORD dwSkillSlotIndex);
|
||||||
|
bool __IsMeleeSkill(CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
bool __IsChargeSkill(CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
DWORD __GetSkillTargetRange(CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
bool __SearchNearTarget();
|
||||||
|
bool __IsUsingChargeSkill();
|
||||||
|
|
||||||
|
bool __ProcessEnemySkillTargetRange(CInstanceBase& rkInstMain, CInstanceBase& rkInstTarget, CPythonSkill::TSkillData& rkSkillData, DWORD dwSkillSlotIndex);
|
||||||
|
|
||||||
|
|
||||||
|
// Item
|
||||||
|
bool __HasEnoughArrow();
|
||||||
|
bool __HasItem(DWORD dwItemID);
|
||||||
|
DWORD __GetPickableDistance();
|
||||||
|
|
||||||
|
|
||||||
|
// Target
|
||||||
|
CInstanceBase* __GetTargetActorPtr();
|
||||||
|
void __ClearTarget();
|
||||||
|
DWORD __GetTargetVID();
|
||||||
|
void __SetTargetVID(DWORD dwVID);
|
||||||
|
bool __IsSameTargetVID(DWORD dwVID);
|
||||||
|
bool __IsTarget();
|
||||||
|
bool __ChangeTargetToPickedInstance();
|
||||||
|
|
||||||
|
CInstanceBase * __GetSkillTargetInstancePtr(CPythonSkill::TSkillData& rkSkillData);
|
||||||
|
CInstanceBase * __GetAliveTargetInstancePtr();
|
||||||
|
CInstanceBase * __GetDeadTargetInstancePtr();
|
||||||
|
|
||||||
|
BOOL __IsRightButtonSkillMode();
|
||||||
|
|
||||||
|
|
||||||
|
// Update
|
||||||
|
void __Update_AutoAttack();
|
||||||
|
void __Update_NotifyGuildAreaEvent();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Emotion
|
||||||
|
BOOL __IsProcessingEmotion();
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
PyObject * m_ppyGameWindow;
|
||||||
|
|
||||||
|
// Client Player Data
|
||||||
|
std::map<DWORD, DWORD> m_skillSlotDict;
|
||||||
|
std::string m_stName;
|
||||||
|
DWORD m_dwMainCharacterIndex;
|
||||||
|
DWORD m_dwRace;
|
||||||
|
DWORD m_dwWeaponMinPower;
|
||||||
|
DWORD m_dwWeaponMaxPower;
|
||||||
|
DWORD m_dwWeaponMinMagicPower;
|
||||||
|
DWORD m_dwWeaponMaxMagicPower;
|
||||||
|
DWORD m_dwWeaponAddPower;
|
||||||
|
|
||||||
|
// Todo
|
||||||
|
DWORD m_dwSendingTargetVID;
|
||||||
|
float m_fTargetUpdateTime;
|
||||||
|
|
||||||
|
// Attack
|
||||||
|
DWORD m_dwAutoAttackTargetVID;
|
||||||
|
|
||||||
|
// NEW_Move
|
||||||
|
EMode m_eReservedMode;
|
||||||
|
float m_fReservedDelayTime;
|
||||||
|
|
||||||
|
float m_fMovDirRot;
|
||||||
|
|
||||||
|
bool m_isUp;
|
||||||
|
bool m_isDown;
|
||||||
|
bool m_isLeft;
|
||||||
|
bool m_isRight;
|
||||||
|
bool m_isAtkKey;
|
||||||
|
bool m_isDirKey;
|
||||||
|
bool m_isCmrRot;
|
||||||
|
bool m_isSmtMov;
|
||||||
|
bool m_isDirMov;
|
||||||
|
|
||||||
|
float m_fCmrRotSpd;
|
||||||
|
|
||||||
|
TPlayerStatus m_playerStatus;
|
||||||
|
|
||||||
|
UINT m_iComboOld;
|
||||||
|
DWORD m_dwVIDReserved;
|
||||||
|
DWORD m_dwIIDReserved;
|
||||||
|
|
||||||
|
DWORD m_dwcurSkillSlotIndex;
|
||||||
|
DWORD m_dwSkillSlotIndexReserved;
|
||||||
|
DWORD m_dwSkillRangeReserved;
|
||||||
|
|
||||||
|
TPixelPosition m_kPPosInstPrev;
|
||||||
|
TPixelPosition m_kPPosReserved;
|
||||||
|
|
||||||
|
// Emotion
|
||||||
|
BOOL m_bisProcessingEmotion;
|
||||||
|
|
||||||
|
// Dungeon
|
||||||
|
BOOL m_isDestPosition;
|
||||||
|
int m_ixDestPos;
|
||||||
|
int m_iyDestPos;
|
||||||
|
int m_iLastAlarmTime;
|
||||||
|
|
||||||
|
// Party
|
||||||
|
std::map<DWORD, TPartyMemberInfo> m_PartyMemberMap;
|
||||||
|
|
||||||
|
// PVP
|
||||||
|
std::set<DWORD> m_ChallengeInstanceSet;
|
||||||
|
std::set<DWORD> m_RevengeInstanceSet;
|
||||||
|
std::set<DWORD> m_CantFightInstanceSet;
|
||||||
|
|
||||||
|
// Private Shop
|
||||||
|
bool m_isOpenPrivateShop;
|
||||||
|
bool m_isObserverMode;
|
||||||
|
|
||||||
|
// Stamina
|
||||||
|
BOOL m_isConsumingStamina;
|
||||||
|
float m_fCurrentStamina;
|
||||||
|
float m_fConsumeStaminaPerSec;
|
||||||
|
|
||||||
|
// Guild
|
||||||
|
DWORD m_inGuildAreaID;
|
||||||
|
|
||||||
|
// Mobile
|
||||||
|
BOOL m_bMobileFlag;
|
||||||
|
|
||||||
|
// System
|
||||||
|
BOOL m_sysIsCoolTime;
|
||||||
|
BOOL m_sysIsLevelLimit;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Game Cursor Data
|
||||||
|
TPixelPosition m_MovingCursorPosition;
|
||||||
|
float m_fMovingCursorSettingTime;
|
||||||
|
DWORD m_adwEffect[EFFECT_NUM];
|
||||||
|
|
||||||
|
DWORD m_dwVIDPicked;
|
||||||
|
DWORD m_dwIIDPicked;
|
||||||
|
int m_aeMBFButton[MBT_NUM];
|
||||||
|
|
||||||
|
DWORD m_dwTargetVID;
|
||||||
|
DWORD m_dwTargetEndTime;
|
||||||
|
DWORD m_dwPlayTime;
|
||||||
|
|
||||||
|
SAutoPotionInfo m_kAutoPotionInfo[AUTO_POTION_TYPE_NUM];
|
||||||
|
|
||||||
|
protected:
|
||||||
|
float MOVABLE_GROUND_DISTANCE;
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<DWORD, DWORD> m_kMap_dwAffectIndexToSkillIndex;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const int c_iFastestSendingCount;
|
||||||
|
extern const int c_iSlowestSendingCount;
|
||||||
|
extern const float c_fFastestSendingDelay;
|
||||||
|
extern const float c_fSlowestSendingDelay;
|
||||||
|
extern const float c_fRotatingStepTime;
|
||||||
|
|
||||||
|
extern const float c_fComboDistance;
|
||||||
|
extern const float c_fPickupDistance;
|
||||||
|
extern const float c_fClickDistance;
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CPythonQuest : public CSingleton<CPythonQuest>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
struct SQuestInstance
|
||||||
|
{
|
||||||
|
SQuestInstance()
|
||||||
|
{
|
||||||
|
dwIndex = 0;
|
||||||
|
iClockValue = 0;
|
||||||
|
iCounterValue = 0;
|
||||||
|
iStartTime = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
DWORD dwIndex;
|
||||||
|
|
||||||
|
std::string strIconFileName;
|
||||||
|
std::string strTitle;
|
||||||
|
|
||||||
|
std::string strClockName;
|
||||||
|
std::string strCounterName;
|
||||||
|
|
||||||
|
int iClockValue;
|
||||||
|
int iCounterValue;
|
||||||
|
|
||||||
|
int iStartTime;
|
||||||
|
};
|
||||||
|
typedef std::vector<SQuestInstance> TQuestInstanceContainer;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonQuest();
|
||||||
|
virtual ~CPythonQuest();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
void RegisterQuestInstance(const SQuestInstance & c_rQuestInstance);
|
||||||
|
void DeleteQuestInstance(DWORD dwIndex);
|
||||||
|
|
||||||
|
bool IsQuest(DWORD dwIndex);
|
||||||
|
void MakeQuest(DWORD dwIndex);
|
||||||
|
|
||||||
|
void SetQuestTitle(DWORD dwIndex, const char * c_szTitle);
|
||||||
|
void SetQuestClockName(DWORD dwIndex, const char * c_szClockName);
|
||||||
|
void SetQuestCounterName(DWORD dwIndex, const char * c_szCounterName);
|
||||||
|
void SetQuestClockValue(DWORD dwIndex, int iClockValue);
|
||||||
|
void SetQuestCounterValue(DWORD dwIndex, int iCounterValue);
|
||||||
|
void SetQuestIconFileName(DWORD dwIndex, const char * c_szIconFileName);
|
||||||
|
|
||||||
|
int GetQuestCount();
|
||||||
|
bool GetQuestInstancePtr(DWORD dwArrayIndex, SQuestInstance ** ppQuestInstance);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __Initialize();
|
||||||
|
bool __GetQuestInstancePtr(DWORD dwQuestIndex, SQuestInstance ** ppQuestInstance);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TQuestInstanceContainer m_QuestInstanceContainer;
|
||||||
|
};
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CPythonSafeBox : public CSingleton<CPythonSafeBox>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SAFEBOX_SLOT_X_COUNT = 5,
|
||||||
|
SAFEBOX_SLOT_Y_COUNT = 9,
|
||||||
|
SAFEBOX_PAGE_SIZE = SAFEBOX_SLOT_X_COUNT * SAFEBOX_SLOT_Y_COUNT,
|
||||||
|
};
|
||||||
|
typedef std::vector<TItemData> TItemInstanceVector;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonSafeBox();
|
||||||
|
virtual ~CPythonSafeBox();
|
||||||
|
|
||||||
|
void OpenSafeBox(int iSize);
|
||||||
|
void SetItemData(DWORD dwSlotIndex, const TItemData & rItemData);
|
||||||
|
void DelItemData(DWORD dwSlotIndex);
|
||||||
|
|
||||||
|
void SetMoney(DWORD dwMoney);
|
||||||
|
DWORD GetMoney();
|
||||||
|
|
||||||
|
BOOL GetSlotItemID(DWORD dwSlotIndex, DWORD* pdwItemID);
|
||||||
|
|
||||||
|
int GetCurrentSafeBoxSize();
|
||||||
|
BOOL GetItemDataPtr(DWORD dwSlotIndex, TItemData ** ppInstance);
|
||||||
|
|
||||||
|
// MALL
|
||||||
|
void OpenMall(int iSize);
|
||||||
|
void SetMallItemData(DWORD dwSlotIndex, const TItemData & rItemData);
|
||||||
|
void DelMallItemData(DWORD dwSlotIndex);
|
||||||
|
BOOL GetMallItemDataPtr(DWORD dwSlotIndex, TItemData ** ppInstance);
|
||||||
|
BOOL GetSlotMallItemID(DWORD dwSlotIndex, DWORD * pdwItemID);
|
||||||
|
DWORD GetMallSize();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TItemInstanceVector m_ItemInstanceVector;
|
||||||
|
TItemInstanceVector m_MallItemInstanceVector;
|
||||||
|
DWORD m_dwMoney;
|
||||||
|
};
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Packet.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 상점 처리
|
||||||
|
*
|
||||||
|
* 2003-01-16 anoa 일차 완료
|
||||||
|
* 2003-12-26 levites 수정
|
||||||
|
*
|
||||||
|
* 2012-10-29 rtsummit 새로운 화폐 출현 및 tab 기능 추가로 인한 shop 확장.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SHOP_COIN_TYPE_GOLD, // DEFAULT VALUE
|
||||||
|
SHOP_COIN_TYPE_SECONDARY_COIN,
|
||||||
|
} EShopCoinType;
|
||||||
|
|
||||||
|
class CPythonShop : public CSingleton<CPythonShop>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CPythonShop(void);
|
||||||
|
virtual ~CPythonShop(void);
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
void SetItemData(DWORD dwIndex, const TShopItemData & c_rShopItemData);
|
||||||
|
BOOL GetItemData(DWORD dwIndex, const TShopItemData ** c_ppItemData);
|
||||||
|
|
||||||
|
void SetItemData(BYTE tabIdx, DWORD dwSlotPos, const TShopItemData & c_rShopItemData);
|
||||||
|
BOOL GetItemData(BYTE tabIdx, DWORD dwSlotPos, const TShopItemData ** c_ppItemData);
|
||||||
|
|
||||||
|
void SetTabCount(BYTE bTabCount) { m_bTabCount = bTabCount; }
|
||||||
|
BYTE GetTabCount() { return m_bTabCount; }
|
||||||
|
|
||||||
|
void SetTabCoinType(BYTE tabIdx, BYTE coinType);
|
||||||
|
BYTE GetTabCoinType(BYTE tabIdx);
|
||||||
|
|
||||||
|
void SetTabName(BYTE tabIdx, const char* name);
|
||||||
|
const char* GetTabName(BYTE tabIdx);
|
||||||
|
|
||||||
|
|
||||||
|
//BOOL GetSlotItemID(DWORD dwSlotPos, DWORD* pdwItemID);
|
||||||
|
|
||||||
|
void Open(BOOL isPrivateShop, BOOL isMainPrivateShop);
|
||||||
|
void Close();
|
||||||
|
BOOL IsOpen();
|
||||||
|
BOOL IsPrivateShop();
|
||||||
|
BOOL IsMainPlayerPrivateShop();
|
||||||
|
|
||||||
|
void ClearPrivateShopStock();
|
||||||
|
void AddPrivateShopItemStock(TItemPos ItemPos, BYTE byDisplayPos, DWORD dwPrice);
|
||||||
|
void DelPrivateShopItemStock(TItemPos ItemPos);
|
||||||
|
int GetPrivateShopItemPrice(TItemPos ItemPos);
|
||||||
|
void BuildPrivateShop(const char * c_szName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
BOOL CheckSlotIndex(DWORD dwIndex);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
BOOL m_isShoping;
|
||||||
|
BOOL m_isPrivateShop;
|
||||||
|
BOOL m_isMainPlayerPrivateShop;
|
||||||
|
|
||||||
|
struct ShopTab
|
||||||
|
{
|
||||||
|
ShopTab()
|
||||||
|
{
|
||||||
|
coinType = SHOP_COIN_TYPE_GOLD;
|
||||||
|
}
|
||||||
|
BYTE coinType;
|
||||||
|
std::string name;
|
||||||
|
TShopItemData items[SHOP_HOST_ITEM_MAX_NUM];
|
||||||
|
};
|
||||||
|
|
||||||
|
BYTE m_bTabCount;
|
||||||
|
ShopTab m_aShoptabs[SHOP_TAB_COUNT_MAX];
|
||||||
|
|
||||||
|
typedef std::map<TItemPos, TShopItemTable> TPrivateShopItemStock;
|
||||||
|
TPrivateShopItemStock m_PrivateShopItemStock;
|
||||||
|
};
|
||||||
@@ -0,0 +1,299 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../GameLib/ItemData.h"
|
||||||
|
#include "../EterBase/Poly/Poly.h"
|
||||||
|
|
||||||
|
class CInstanceBase;
|
||||||
|
|
||||||
|
class CPythonSkill : public CSingleton<CPythonSkill>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SKILL_TYPE_NONE,
|
||||||
|
SKILL_TYPE_ACTIVE,
|
||||||
|
SKILL_TYPE_SUPPORT,
|
||||||
|
SKILL_TYPE_GUILD,
|
||||||
|
SKILL_TYPE_HORSE,
|
||||||
|
SKILL_TYPE_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ESkillTableTokenType
|
||||||
|
{
|
||||||
|
TABLE_TOKEN_TYPE_VNUM,
|
||||||
|
TABLE_TOKEN_TYPE_NAME,
|
||||||
|
TABLE_TOKEN_TYPE_TYPE,
|
||||||
|
TABLE_TOKEN_TYPE_LEVEL_STEP,
|
||||||
|
TABLE_TOKEN_TYPE_MAX_LEVEL,
|
||||||
|
TABLE_TOKEN_TYPE_LEVEL_LIMIT,
|
||||||
|
TABLE_TOKEN_TYPE_POINT_ON,
|
||||||
|
TABLE_TOKEN_TYPE_POINT_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_SP_COST_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_DURATION_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_DURATION_SP_COST_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_COOLDOWN_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_MASTER_BONUS_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_ATTACK_GRADE_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_FLAG,
|
||||||
|
TABLE_TOKEN_TYPE_AFFECT_FLAG,
|
||||||
|
TABLE_TOKEN_TYPE_POINT_ON2,
|
||||||
|
TABLE_TOKEN_TYPE_POINT_POLY2,
|
||||||
|
TABLE_TOKEN_TYPE_DURATION_POLY2,
|
||||||
|
TABLE_TOKEN_TYPE_AFFECT_FLAG2,
|
||||||
|
TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_VNUM,
|
||||||
|
TABLE_TOKEN_TYPE_PREREQUISITE_SKILL_LEVEL,
|
||||||
|
TABLE_TOKEN_TYPE_SKILL_TYPE,
|
||||||
|
TABLE_TOKEN_TYPE_MAX_HIT,
|
||||||
|
TABLE_TOKEN_TYPE_SPLASH_AROUND_DAMAGE_ADJUST_POLY,
|
||||||
|
TABLE_TOKEN_TYPE_TARGET_RANGE,
|
||||||
|
TABLE_TOKEN_TYPE_SPLASH_RANGE,
|
||||||
|
TABLE_TOKEN_TYPE_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ESkillDescTokenType
|
||||||
|
{
|
||||||
|
DESC_TOKEN_TYPE_VNUM,
|
||||||
|
DESC_TOKEN_TYPE_JOB,
|
||||||
|
DESC_TOKEN_TYPE_NAME1,
|
||||||
|
DESC_TOKEN_TYPE_NAME2,
|
||||||
|
DESC_TOKEN_TYPE_NAME3,
|
||||||
|
DESC_TOKEN_TYPE_DESCRIPTION,
|
||||||
|
DESC_TOKEN_TYPE_CONDITION1,
|
||||||
|
DESC_TOKEN_TYPE_CONDITION2,
|
||||||
|
DESC_TOKEN_TYPE_CONDITION3,
|
||||||
|
DESC_TOKEN_TYPE_CONDITION4,
|
||||||
|
DESC_TOKEN_TYPE_ATTRIBUTE,
|
||||||
|
DESC_TOKEN_TYPE_WEAPON,
|
||||||
|
DESC_TOKEN_TYPE_ICON_NAME,
|
||||||
|
DESC_TOKEN_TYPE_MOTION_INDEX,
|
||||||
|
DESC_TOKEN_TYPE_MOTION_INDEX_GRADE_NUM,
|
||||||
|
DESC_TOKEN_TYPE_TARGET_COUNT_FORMULA,
|
||||||
|
DESC_TOKEN_TYPE_MOTION_LOOP_COUNT_FORMULA,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_DESCRIPTION_1,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MIN_1,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MAX_1,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_DESCRIPTION_2,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MIN_2,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MAX_2,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_DESCRIPTION_3,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MIN_3,
|
||||||
|
DESC_TOKEN_TYPE_AFFECT_MAX_3,
|
||||||
|
DESC_TOKEN_TYPE_LEVEL_LIMIT,
|
||||||
|
DESC_TOKEN_TYPE_MAX_LEVEL,
|
||||||
|
DESC_TOKEN_TYPE_MAX_NUM,
|
||||||
|
|
||||||
|
CONDITION_COLUMN_COUNT = 3,
|
||||||
|
AFFECT_COLUMN_COUNT = 3,
|
||||||
|
AFFECT_STEP_COUNT = 3,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SKILL_ATTRIBUTE_NEED_TARGET = (1 << 0),
|
||||||
|
SKILL_ATTRIBUTE_TOGGLE = (1 << 1),
|
||||||
|
SKILL_ATTRIBUTE_WEAPON_LIMITATION = (1 << 2),
|
||||||
|
SKILL_ATTRIBUTE_MELEE_ATTACK = (1 << 3),
|
||||||
|
SKILL_ATTRIBUTE_USE_HP = (1 << 4),
|
||||||
|
SKILL_ATTRIBUTE_CAN_CHANGE_DIRECTION = (1 << 5),
|
||||||
|
SKILL_ATTRIBUTE_STANDING_SKILL = (1 << 6),
|
||||||
|
SKILL_ATTRIBUTE_ONLY_FOR_ALLIANCE = (1 << 7),
|
||||||
|
SKILL_ATTRIBUTE_CAN_USE_FOR_ME = (1 << 8),
|
||||||
|
SKILL_ATTRIBUTE_NEED_CORPSE = (1 << 9),
|
||||||
|
SKILL_ATTRIBUTE_FAN_RANGE = (1 << 10),
|
||||||
|
SKILL_ATTRIBUTE_CAN_USE_IF_NOT_ENOUGH = (1 << 11),
|
||||||
|
SKILL_ATTRIBUTE_NEED_EMPTY_BOTTLE = (1 << 12),
|
||||||
|
SKILL_ATTRIBUTE_NEED_POISON_BOTTLE = (1 << 13),
|
||||||
|
SKILL_ATTRIBUTE_ATTACK_SKILL = (1 << 14),
|
||||||
|
SKILL_ATTRIBUTE_TIME_INCREASE_SKILL = (1 << 15), // 증지술 전용 attribute
|
||||||
|
SKILL_ATTRIBUTE_CHARGE_ATTACK = (1 << 16),
|
||||||
|
SKILL_ATTRIBUTE_PASSIVE = (1 << 17),
|
||||||
|
SKILL_ATTRIBUTE_CANNOT_LEVEL_UP = (1 << 18),
|
||||||
|
SKILL_ATTRIBUTE_ONLY_FOR_GUILD_WAR = (1 << 19),
|
||||||
|
SKILL_ATTRIBUTE_MOVING_SKILL = (1 << 20),
|
||||||
|
SKILL_ATTRIBUTE_HORSE_SKILL = (1 << 21),
|
||||||
|
SKILL_ATTRIBUTE_CIRCLE_RANGE = (1 << 22),
|
||||||
|
SKILL_ATTRIBUTE_SEARCH_TARGET = (1 << 23),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SKILL_NEED_WEAPON_SWORD = (1 << CItemData::WEAPON_SWORD),
|
||||||
|
SKILL_NEED_WEAPON_DAGGER = (1 << CItemData::WEAPON_DAGGER),
|
||||||
|
SKILL_NEED_WEAPON_BOW = (1 << CItemData::WEAPON_BOW),
|
||||||
|
SKILL_NEED_WEAPON_TWO_HANDED = (1 << CItemData::WEAPON_TWO_HANDED),
|
||||||
|
SKILL_NEED_WEAPON_DOUBLE_SWORD = (1 << CItemData::WEAPON_DAGGER),
|
||||||
|
SKILL_NEED_WEAPON_BELL = (1 << CItemData::WEAPON_BELL),
|
||||||
|
SKILL_NEED_WEAPON_FAN = (1 << CItemData::WEAPON_FAN),
|
||||||
|
SKILL_NEED_WEAPON_ARROW = (1 << CItemData::WEAPON_ARROW),
|
||||||
|
SKILL_NEED_WEAPON_EMPTY_HAND = (1 << CItemData::WEAPON_NONE),
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
VALUE_TYPE_FREE,
|
||||||
|
VALUE_TYPE_MIN,
|
||||||
|
VALUE_TYPE_MAX,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
SKILL_GRADE_COUNT = 3,
|
||||||
|
SKILL_EFFECT_COUNT = 4, //스킬은 초,중,고급 이외에 마스터일때 이펙트 추가.
|
||||||
|
SKILL_GRADE_STEP_COUNT = 20,
|
||||||
|
SKILL_GRADEGAP = 25,
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SAffectData
|
||||||
|
{
|
||||||
|
std::string strAffectDescription;
|
||||||
|
std::string strAffectMinFormula;
|
||||||
|
std::string strAffectMaxFormula;
|
||||||
|
} TAffectData;
|
||||||
|
typedef struct SAffectDataNew
|
||||||
|
{
|
||||||
|
std::string strPointType;
|
||||||
|
std::string strPointPoly;
|
||||||
|
} TAffectDataNew;
|
||||||
|
typedef struct SRequireStatData
|
||||||
|
{
|
||||||
|
BYTE byPoint;
|
||||||
|
BYTE byLevel;
|
||||||
|
} TRequireStatData;
|
||||||
|
typedef struct SGradeData
|
||||||
|
{
|
||||||
|
std::string strName;
|
||||||
|
CGraphicImage * pImage;
|
||||||
|
WORD wMotionIndex;
|
||||||
|
} TGradeData;
|
||||||
|
typedef struct SSkillData
|
||||||
|
{
|
||||||
|
static DWORD MELEE_SKILL_TARGET_RANGE;
|
||||||
|
// Functions
|
||||||
|
SSkillData();
|
||||||
|
DWORD GetTargetRange() const;
|
||||||
|
BOOL CanChangeDirection();
|
||||||
|
BOOL IsFanRange();
|
||||||
|
BOOL IsCircleRange();
|
||||||
|
BOOL IsAutoSearchTarget();
|
||||||
|
BOOL IsNeedTarget();
|
||||||
|
BOOL IsNeedCorpse();
|
||||||
|
BOOL IsToggleSkill();
|
||||||
|
BOOL IsUseHPSkill();
|
||||||
|
BOOL IsStandingSkill();
|
||||||
|
BOOL CanUseWeaponType(DWORD dwWeaponType);
|
||||||
|
BOOL IsOnlyForAlliance();
|
||||||
|
BOOL CanUseForMe();
|
||||||
|
BOOL CanUseIfNotEnough();
|
||||||
|
BOOL IsNeedEmptyBottle();
|
||||||
|
BOOL IsNeedPoisonBottle();
|
||||||
|
BOOL IsNeedBow();
|
||||||
|
BOOL IsAttackSkill();
|
||||||
|
BOOL IsHorseSkill();
|
||||||
|
BOOL IsMovingSkill();
|
||||||
|
BOOL IsTimeIncreaseSkill();
|
||||||
|
BOOL IsMeleeSkill();
|
||||||
|
BOOL IsChargeSkill();
|
||||||
|
BOOL IsOnlyForGuildWar();
|
||||||
|
|
||||||
|
bool GetState(const char * c_szStateName, int * piState, int iMinMaxType = VALUE_TYPE_FREE);
|
||||||
|
float ProcessFormula(CPoly * pPoly, float fSkillLevel = 0.0f, int iMinMaxType = VALUE_TYPE_FREE);
|
||||||
|
const char * GetAffectDescription(DWORD dwIndex, float fSkillLevel);
|
||||||
|
DWORD GetSkillCoolTime(float fSkillPoint);
|
||||||
|
int GetNeedSP(float fSkillPoint);
|
||||||
|
DWORD GetContinuationSP(float fSkillPoint);
|
||||||
|
DWORD GetMotionLoopCount(float fSkillPoint);
|
||||||
|
DWORD GetTargetCount(float fSkillPoint);
|
||||||
|
DWORD GetDuration(float fSkillPoint);
|
||||||
|
DWORD GetSkillMotionIndex(int iGrade=-1);
|
||||||
|
BYTE GetMaxLevel();
|
||||||
|
BYTE GetLevelUpPoint();
|
||||||
|
bool IsCanUseSkill();
|
||||||
|
BOOL IsNoMotion();
|
||||||
|
|
||||||
|
const std::string GetName() const;
|
||||||
|
BYTE GetType() const;
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// Variable
|
||||||
|
BYTE byType;
|
||||||
|
DWORD dwSkillIndex;
|
||||||
|
BYTE byMaxLevel;
|
||||||
|
BYTE byLevelUpPoint;
|
||||||
|
BYTE byLevelLimit;
|
||||||
|
BOOL bNoMotion;
|
||||||
|
|
||||||
|
std::string strName;
|
||||||
|
std::string strIconFileName;
|
||||||
|
std::string strDescription;
|
||||||
|
std::string strMotionScriptFileName;
|
||||||
|
|
||||||
|
std::vector<std::string> ConditionDataVector;
|
||||||
|
std::vector<TAffectData> AffectDataVector;
|
||||||
|
std::vector<TAffectDataNew> AffectDataNewVector;
|
||||||
|
std::vector<TRequireStatData> RequireStatDataVector;
|
||||||
|
std::string strCoolTimeFormula;
|
||||||
|
std::string strTargetCountFormula;
|
||||||
|
std::string strMotionLoopCountFormula;
|
||||||
|
std::string strNeedSPFormula;
|
||||||
|
std::string strContinuationSPFormula;
|
||||||
|
std::string strDuration;
|
||||||
|
|
||||||
|
DWORD dwSkillAttribute;
|
||||||
|
DWORD dwNeedWeapon;
|
||||||
|
DWORD dwTargetRange;
|
||||||
|
WORD wMotionIndex; // 없어질 변수
|
||||||
|
WORD wMotionIndexForMe; // 없어질 변수
|
||||||
|
|
||||||
|
BOOL isRequirement;
|
||||||
|
std::string strRequireSkillName;
|
||||||
|
BYTE byRequireSkillLevel;
|
||||||
|
|
||||||
|
TGradeData GradeData[SKILL_EFFECT_COUNT];
|
||||||
|
|
||||||
|
CGraphicImage * pImage;
|
||||||
|
|
||||||
|
/////
|
||||||
|
|
||||||
|
static std::map<std::string, DWORD> ms_StatusNameMap;
|
||||||
|
static std::map<std::string, DWORD> ms_NewMinStatusNameMap;
|
||||||
|
static std::map<std::string, DWORD> ms_NewMaxStatusNameMap;
|
||||||
|
static DWORD ms_dwTimeIncreaseSkillNumber;
|
||||||
|
} TSkillData;
|
||||||
|
|
||||||
|
typedef std::map<DWORD, TSkillData> TSkillDataMap;
|
||||||
|
typedef std::map<DWORD, DWORD> TSkillMotionIndexMap;
|
||||||
|
typedef std::map<std::string, std::string> TPathNameMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonSkill();
|
||||||
|
virtual ~CPythonSkill();
|
||||||
|
|
||||||
|
void Destroy();
|
||||||
|
bool RegisterSkill(DWORD dwSkillIndex, const char * c_szFileName);
|
||||||
|
bool RegisterSkillTable(const char * c_szFileName);
|
||||||
|
bool RegisterSkillDesc(const char * c_szFileName);
|
||||||
|
BOOL GetSkillData(DWORD dwSkillIndex, TSkillData ** ppSkillData);
|
||||||
|
bool GetSkillDataByName(const char * c_szName, TSkillData ** ppSkillData);
|
||||||
|
|
||||||
|
void SetPathName(const char * c_szFileName);
|
||||||
|
const char * GetPathName();
|
||||||
|
|
||||||
|
void TEST();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void __RegisterGradeIconImage(TSkillData & rData, const char * c_szHeader, const char * c_szImageName);
|
||||||
|
void __RegisterNormalIconImage(TSkillData & rData, const char * c_szHeader, const char * c_szImageName);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TSkillDataMap m_SkillDataMap;
|
||||||
|
|
||||||
|
std::string m_strPathName;
|
||||||
|
|
||||||
|
std::map<std::string, DWORD> m_SkillTypeIndexMap;
|
||||||
|
std::map<std::string, DWORD> m_SkillAttributeIndexMap;
|
||||||
|
std::map<std::string, DWORD> m_SkillNeedWeaponIndexMap;
|
||||||
|
std::map<std::string, DWORD> m_SkillWeaponTypeIndexMap;
|
||||||
|
TPathNameMap m_PathNameMap;
|
||||||
|
};
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class CPythonSystem : public CSingleton<CPythonSystem>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum EWindow
|
||||||
|
{
|
||||||
|
WINDOW_STATUS,
|
||||||
|
WINDOW_INVENTORY,
|
||||||
|
WINDOW_ABILITY,
|
||||||
|
WINDOW_SOCIETY,
|
||||||
|
WINDOW_JOURNAL,
|
||||||
|
WINDOW_COMMAND,
|
||||||
|
|
||||||
|
WINDOW_QUICK,
|
||||||
|
WINDOW_GAUGE,
|
||||||
|
WINDOW_MINIMAP,
|
||||||
|
WINDOW_CHAT,
|
||||||
|
|
||||||
|
WINDOW_MAX_NUM,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
FREQUENCY_MAX_NUM = 30,
|
||||||
|
RESOLUTION_MAX_NUM = 100
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct SResolution
|
||||||
|
{
|
||||||
|
DWORD width;
|
||||||
|
DWORD height;
|
||||||
|
DWORD bpp; // bits per pixel (high-color = 16bpp, true-color = 32bpp)
|
||||||
|
|
||||||
|
DWORD frequency[20];
|
||||||
|
BYTE frequency_count;
|
||||||
|
} TResolution;
|
||||||
|
|
||||||
|
typedef struct SWindowStatus
|
||||||
|
{
|
||||||
|
int isVisible;
|
||||||
|
int isMinimized;
|
||||||
|
|
||||||
|
int ixPosition;
|
||||||
|
int iyPosition;
|
||||||
|
int iHeight;
|
||||||
|
} TWindowStatus;
|
||||||
|
|
||||||
|
typedef struct SConfig
|
||||||
|
{
|
||||||
|
DWORD width;
|
||||||
|
DWORD height;
|
||||||
|
DWORD bpp;
|
||||||
|
DWORD frequency;
|
||||||
|
|
||||||
|
bool is_software_cursor;
|
||||||
|
bool is_object_culling;
|
||||||
|
int iDistance;
|
||||||
|
int iShadowLevel;
|
||||||
|
|
||||||
|
FLOAT music_volume;
|
||||||
|
BYTE voice_volume;
|
||||||
|
|
||||||
|
int gamma;
|
||||||
|
|
||||||
|
int isSaveID;
|
||||||
|
char SaveID[20];
|
||||||
|
|
||||||
|
bool bWindowed;
|
||||||
|
bool bDecompressDDS;
|
||||||
|
bool bNoSoundCard;
|
||||||
|
bool bUseDefaultIME;
|
||||||
|
BYTE bSoftwareTiling;
|
||||||
|
bool bViewChat;
|
||||||
|
bool bAlwaysShowName;
|
||||||
|
bool bShowDamage;
|
||||||
|
bool bShowSalesText;
|
||||||
|
} TConfig;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonSystem();
|
||||||
|
virtual ~CPythonSystem();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
void SetInterfaceHandler(PyObject * poHandler);
|
||||||
|
void DestroyInterfaceHandler();
|
||||||
|
|
||||||
|
// Config
|
||||||
|
void SetDefaultConfig();
|
||||||
|
bool LoadConfig();
|
||||||
|
bool SaveConfig();
|
||||||
|
void ApplyConfig();
|
||||||
|
void SetConfig(TConfig * set_config);
|
||||||
|
TConfig * GetConfig();
|
||||||
|
void ChangeSystem();
|
||||||
|
|
||||||
|
// Interface
|
||||||
|
bool LoadInterfaceStatus();
|
||||||
|
void SaveInterfaceStatus();
|
||||||
|
bool isInterfaceConfig();
|
||||||
|
const TWindowStatus & GetWindowStatusReference(int iIndex);
|
||||||
|
|
||||||
|
DWORD GetWidth();
|
||||||
|
DWORD GetHeight();
|
||||||
|
DWORD GetBPP();
|
||||||
|
DWORD GetFrequency();
|
||||||
|
bool IsSoftwareCursor();
|
||||||
|
bool IsWindowed();
|
||||||
|
bool IsViewChat();
|
||||||
|
bool IsAlwaysShowName();
|
||||||
|
bool IsShowDamage();
|
||||||
|
bool IsShowSalesText();
|
||||||
|
bool IsUseDefaultIME();
|
||||||
|
bool IsNoSoundCard();
|
||||||
|
bool IsAutoTiling();
|
||||||
|
bool IsSoftwareTiling();
|
||||||
|
void SetSoftwareTiling(bool isEnable);
|
||||||
|
void SetViewChatFlag(int iFlag);
|
||||||
|
void SetAlwaysShowNameFlag(int iFlag);
|
||||||
|
void SetShowDamageFlag(int iFlag);
|
||||||
|
void SetShowSalesTextFlag(int iFlag);
|
||||||
|
|
||||||
|
// Window
|
||||||
|
void SaveWindowStatus(int iIndex, int iVisible, int iMinimized, int ix, int iy, int iHeight);
|
||||||
|
|
||||||
|
// SaveID
|
||||||
|
int IsSaveID();
|
||||||
|
const char * GetSaveID();
|
||||||
|
void SetSaveID(int iValue, const char * c_szSaveID);
|
||||||
|
|
||||||
|
/// Display
|
||||||
|
void GetDisplaySettings();
|
||||||
|
|
||||||
|
int GetResolutionCount();
|
||||||
|
int GetFrequencyCount(int index);
|
||||||
|
bool GetResolution(int index, OUT DWORD *width, OUT DWORD *height, OUT DWORD *bpp);
|
||||||
|
bool GetFrequency(int index, int freq_index, OUT DWORD *frequncy);
|
||||||
|
int GetResolutionIndex(DWORD width, DWORD height, DWORD bpp);
|
||||||
|
int GetFrequencyIndex(int res_index, DWORD frequency);
|
||||||
|
bool isViewCulling();
|
||||||
|
|
||||||
|
// Sound
|
||||||
|
float GetMusicVolume();
|
||||||
|
int GetSoundVolume();
|
||||||
|
void SetMusicVolume(float fVolume);
|
||||||
|
void SetSoundVolumef(float fVolume);
|
||||||
|
|
||||||
|
int GetDistance();
|
||||||
|
int GetShadowLevel();
|
||||||
|
void SetShadowLevel(unsigned int level);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TResolution m_ResolutionList[RESOLUTION_MAX_NUM];
|
||||||
|
int m_ResolutionCount;
|
||||||
|
|
||||||
|
TConfig m_Config;
|
||||||
|
TConfig m_OldConfig;
|
||||||
|
|
||||||
|
bool m_isInterfaceConfig;
|
||||||
|
PyObject * m_poInterfaceHandler;
|
||||||
|
TWindowStatus m_WindowStatus[WINDOW_MAX_NUM];
|
||||||
|
};
|
||||||
@@ -0,0 +1,113 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterBase/Singleton.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 따라다니는 텍스트 처리
|
||||||
|
*/
|
||||||
|
class CPythonTextTail : public CSingleton<CPythonTextTail>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef struct STextTail
|
||||||
|
{
|
||||||
|
CGraphicTextInstance* pTextInstance;
|
||||||
|
CGraphicTextInstance* pOwnerTextInstance;
|
||||||
|
|
||||||
|
CGraphicMarkInstance* pMarkInstance;
|
||||||
|
CGraphicTextInstance* pGuildNameTextInstance;
|
||||||
|
|
||||||
|
CGraphicTextInstance* pTitleTextInstance;
|
||||||
|
CGraphicTextInstance* pLevelTextInstance;
|
||||||
|
|
||||||
|
|
||||||
|
// Todo : 이건 전부 VID로 바꾸도록 한다.
|
||||||
|
// 도중 캐릭터가 없어질 경우 튕길 가능성이 있음
|
||||||
|
CGraphicObjectInstance * pOwner;
|
||||||
|
|
||||||
|
DWORD dwVirtualID;
|
||||||
|
|
||||||
|
float x, y, z;
|
||||||
|
float fDistanceFromPlayer;
|
||||||
|
D3DXCOLOR Color;
|
||||||
|
BOOL bNameFlag; // 이름도 함께 켤것인지의 플래그
|
||||||
|
|
||||||
|
float xStart, yStart;
|
||||||
|
float xEnd, yEnd;
|
||||||
|
|
||||||
|
DWORD LivingTime;
|
||||||
|
|
||||||
|
float fHeight;
|
||||||
|
|
||||||
|
STextTail() {}
|
||||||
|
virtual ~STextTail() {}
|
||||||
|
} TTextTail;
|
||||||
|
|
||||||
|
typedef std::map<DWORD, TTextTail*> TTextTailMap;
|
||||||
|
typedef std::list<TTextTail*> TTextTailList;
|
||||||
|
typedef TTextTailMap TChatTailMap;
|
||||||
|
|
||||||
|
public:
|
||||||
|
CPythonTextTail(void);
|
||||||
|
virtual ~CPythonTextTail(void);
|
||||||
|
|
||||||
|
void GetInfo(std::string* pstInfo);
|
||||||
|
|
||||||
|
void Initialize();
|
||||||
|
void Destroy();
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
void UpdateAllTextTail();
|
||||||
|
void UpdateShowingTextTail();
|
||||||
|
void Render();
|
||||||
|
|
||||||
|
void ArrangeTextTail();
|
||||||
|
void HideAllTextTail();
|
||||||
|
void ShowAllTextTail();
|
||||||
|
void ShowCharacterTextTail(DWORD VirtualID);
|
||||||
|
void ShowItemTextTail(DWORD VirtualID);
|
||||||
|
|
||||||
|
void RegisterCharacterTextTail(DWORD dwGuildID, DWORD dwVirtualID, const D3DXCOLOR & c_rColor, float fAddHeight=10.0f);
|
||||||
|
void RegisterItemTextTail(DWORD VirtualID, const char * c_szText, CGraphicObjectInstance * pOwner);
|
||||||
|
void RegisterChatTail(DWORD VirtualID, const char * c_szChat);
|
||||||
|
void RegisterInfoTail(DWORD VirtualID, const char * c_szChat);
|
||||||
|
void SetCharacterTextTailColor(DWORD VirtualID, const D3DXCOLOR & c_rColor);
|
||||||
|
void SetItemTextTailOwner(DWORD dwVID, const char * c_szName);
|
||||||
|
void DeleteCharacterTextTail(DWORD VirtualID);
|
||||||
|
void DeleteItemTextTail(DWORD VirtualID);
|
||||||
|
|
||||||
|
int Pick(int ixMouse, int iyMouse);
|
||||||
|
void SelectItemName(DWORD dwVirtualID);
|
||||||
|
|
||||||
|
bool GetTextTailPosition(DWORD dwVID, float* px, float* py, float* pz);
|
||||||
|
bool IsChatTextTail(DWORD dwVID);
|
||||||
|
|
||||||
|
void EnablePKTitle(BOOL bFlag);
|
||||||
|
void AttachTitle(DWORD dwVID, const char * c_szName, const D3DXCOLOR& c_rColor);
|
||||||
|
void DetachTitle(DWORD dwVID);
|
||||||
|
|
||||||
|
void AttachLevel(DWORD dwVID, const char* c_szText, const D3DXCOLOR& c_rColor);
|
||||||
|
void DetachLevel(DWORD dwVID);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TTextTail * RegisterTextTail(DWORD dwVirtualID, const char * c_szText, CGraphicObjectInstance * pOwner, float fHeight, const D3DXCOLOR & c_rColor);
|
||||||
|
void DeleteTextTail(TTextTail * pTextTail);
|
||||||
|
|
||||||
|
void UpdateTextTail(TTextTail * pTextTail);
|
||||||
|
void RenderTextTailBox(TTextTail * pTextTail);
|
||||||
|
void RenderTextTailName(TTextTail * pTextTail);
|
||||||
|
void UpdateDistance(const TPixelPosition & c_rCenterPosition, TTextTail * pTextTail);
|
||||||
|
|
||||||
|
bool isIn(TTextTail * pSource, TTextTail * pTarget);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TTextTailMap m_CharacterTextTailMap;
|
||||||
|
TTextTailMap m_ItemTextTailMap;
|
||||||
|
TChatTailMap m_ChatTailMap;
|
||||||
|
|
||||||
|
TTextTailList m_CharacterTextTailList;
|
||||||
|
TTextTailList m_ItemTextTailList;
|
||||||
|
|
||||||
|
private:
|
||||||
|
CDynamicPool<STextTail> m_TextTailPool;
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../EterLib/NetStream.h"
|
||||||
|
|
||||||
|
class CServerStateChecker : public CSingleton<CServerStateChecker>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CServerStateChecker();
|
||||||
|
virtual ~CServerStateChecker();
|
||||||
|
|
||||||
|
void Create(PyObject* poWnd);
|
||||||
|
void AddChannel(UINT uServerIndex, const char* c_szAddr, UINT uPort);
|
||||||
|
void Request();
|
||||||
|
void Update();
|
||||||
|
|
||||||
|
void Initialize();
|
||||||
|
|
||||||
|
private:
|
||||||
|
typedef struct SChannel
|
||||||
|
{
|
||||||
|
UINT uServerIndex;
|
||||||
|
const char* c_szAddr;
|
||||||
|
UINT uPort;
|
||||||
|
} TChannel;
|
||||||
|
|
||||||
|
PyObject* m_poWnd;
|
||||||
|
|
||||||
|
std::list<TChannel> m_lstChannel;
|
||||||
|
|
||||||
|
CNetworkStream m_kStream;
|
||||||
|
};
|
||||||
@@ -8,6 +8,24 @@
|
|||||||
// (docs/PORT-PLAN.md 批次 2V0-2V3).
|
// (docs/PORT-PLAN.md 批次 2V0-2V3).
|
||||||
|
|
||||||
#include "../ScriptLib/StdAfx.h"
|
#include "../ScriptLib/StdAfx.h"
|
||||||
|
#include "../GameLib/StdAfx.h" // 40250 PCH order: GameLib types precede UserInterface/GameType.h.
|
||||||
|
#include "../GameLib/RaceData.h"
|
||||||
|
#include "../EterPythonLib/StdAfx.h"
|
||||||
|
#include "GameType.h" // 40250's UserInterface precompiled header supplies these item types.
|
||||||
|
#include "Locale.h"
|
||||||
|
#include "../EterBase/tea.h"
|
||||||
|
#include <dinput.h>
|
||||||
|
|
||||||
|
// 40250's Windows PCH also includes DirectShow. The macOS UI adapter owns the video backend;
|
||||||
|
// these opaque interfaces are only pointer members in PythonApplication.h.
|
||||||
|
#ifndef _WIN32
|
||||||
|
struct IBaseFilter;
|
||||||
|
struct ISampleGrabber;
|
||||||
|
struct IMediaControl;
|
||||||
|
struct IMediaEventEx;
|
||||||
|
struct IVideoWindow;
|
||||||
|
struct IBasicVideo;
|
||||||
|
#endif
|
||||||
|
|
||||||
#define APP_NAME "Metin 2"
|
#define APP_NAME "Metin 2"
|
||||||
|
|
||||||
@@ -25,3 +43,4 @@ enum
|
|||||||
// The Python module initializers RunMainScript calls, each defined in its own Python*Module.cpp.
|
// The Python module initializers RunMainScript calls, each defined in its own Python*Module.cpp.
|
||||||
// Listed here as 40250 lists them; only the ported ones are defined.
|
// Listed here as 40250 lists them; only the ported ones are defined.
|
||||||
void initpack();
|
void initpack();
|
||||||
|
void initapp();
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by UserInterface.rc
|
||||||
|
//
|
||||||
|
#define IDS_APP_NAME 1
|
||||||
|
#define IDS_POSSESSIVE_MORPHENE 2
|
||||||
|
#define IDS_WARN_BAD_DRIVER 3
|
||||||
|
#define IDS_WARN_NO_TNL 4
|
||||||
|
#define IDS_ERR_CANNOT_READ_FILE 5
|
||||||
|
#define IDS_ERR_NOT_LATEST_FILE 6
|
||||||
|
#define IDS_ERR_MUST_LAUNCH_FROM_PATCHER 7
|
||||||
|
#define IDI_METIN2 100
|
||||||
|
#define IDD_COLOR_DIALOG 101
|
||||||
|
#define IDC_CURSOR_NORMAL 102
|
||||||
|
#define IDC_CURSOR_ATTACK 104
|
||||||
|
#define IDC_CURSOR_CHAIR 105
|
||||||
|
#define IDC_CURSOR_DOOR 106
|
||||||
|
#define IDC_CURSOR_NO 107
|
||||||
|
#define IDC_CURSOR_PICK 108
|
||||||
|
#define IDC_CURSOR_TALK 109
|
||||||
|
#define IDC_CURSOR_BUY 110
|
||||||
|
#define IDC_CURSOR_SELL 111
|
||||||
|
#define IDC_CURSOR_PICKUP 114
|
||||||
|
#define IDC_CURSOR_CAMERA_ROTATE 139
|
||||||
|
#define IDC_CURSOR_HSIZE 140
|
||||||
|
#define IDC_CURSOR_VSIZE 141
|
||||||
|
#define IDC_CURSOR_HVSIZE 142
|
||||||
|
#define IDD_SELECT_LOCALE 143
|
||||||
|
#define IDR_VERTEXSHADER_LEAF_DYNAMIC_LIGHTING 150
|
||||||
|
#define IDR_VERTEXSHADER_LEAF_STATIC_LIGHTING 151
|
||||||
|
#define IDR_VERTEXSHADER_WINDYBRANCH_DYNAMIC_LIGHTING 152
|
||||||
|
#define IDR_VERTEXSHADER_WINDYLEAF_DYNAMIC_LIGHTING 153
|
||||||
|
#define IDR_VERTEXSHADER_WINDYLEAF_STATIC_LIGHTING 154
|
||||||
|
#define IDR_VERTEXSHADER_WINDYBRANCH_STATIC_LIGHTING 155
|
||||||
|
#define IDC_MATERIAL_AMBIENT_SLIDER_RED 1000
|
||||||
|
#define IDC_START 1001
|
||||||
|
#define IDC_MATERIAL_AMBIENT_SLIDER_GREEN 1001
|
||||||
|
#define IDC_EXIT 1002
|
||||||
|
#define IDC_MATERIAL_AMBIENT_SLIDER_BLUE 1002
|
||||||
|
#define IDC_LOCALE_LIST 1003
|
||||||
|
#define IDC_MATERIAL_AMBIENT_PRINT_RED 1003
|
||||||
|
#define IDC_MATERIAL_AMBIENT_PRINT_GREEN 1004
|
||||||
|
#define IDC_MATERIAL_AMBIENT_PRINT_BLUE 1005
|
||||||
|
#define IDC_NATURE_AMBIENT_SLIDER_RED 1006
|
||||||
|
#define IDC_NATURE_AMBIENT_SLIDER_GREEN 1007
|
||||||
|
#define IDC_NATURE_AMBIENT_SLIDER_BLUE 1008
|
||||||
|
#define IDC_NATURE_AMBIENT_PRINT_RED 1009
|
||||||
|
#define IDC_NATURE_AMBIENT_PRINT_GREEN 1010
|
||||||
|
#define IDC_NATURE_AMBIENT_PRINT_BLUE 1011
|
||||||
|
#define IDC_LIGHT_COLOR_SLIDER_RED 1012
|
||||||
|
#define IDC_LIGHT_COLOR_SLIDER_GREEN 1013
|
||||||
|
#define IDC_LIGHT_COLOR_SLIDER_BLUE 1014
|
||||||
|
#define IDC_LIGHT_COLOR_PRINT_RED 1015
|
||||||
|
#define IDC_LIGHT_COLOR_PRINT_GREEN 1016
|
||||||
|
#define IDC_LIGHT_COLOR_PRINT_BLUE 1017
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 145
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Python.h>
|
||||||
|
|
||||||
|
// The 40250 Python API represents native handles as integers. Keep that API while allowing a
|
||||||
|
// 64-bit pointer to survive the round trip on macOS and mobile builds.
|
||||||
|
template <typename T>
|
||||||
|
PyObject* Py_BuildPointer(T* pointer)
|
||||||
|
{
|
||||||
|
return PyLong_FromVoidPtr(static_cast<void*>(pointer));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool PyTuple_GetPointer(PyObject* args, int position, T** out)
|
||||||
|
{
|
||||||
|
if (position < 0 || position >= PyTuple_Size(args))
|
||||||
|
return false;
|
||||||
|
PyObject* value = PyTuple_GetItem(args, position);
|
||||||
|
if (!value)
|
||||||
|
return false;
|
||||||
|
void* pointer = PyLong_AsVoidPtr(value);
|
||||||
|
if (PyErr_Occurred())
|
||||||
|
return false;
|
||||||
|
*out = static_cast<T*>(pointer);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -4,10 +4,14 @@
|
|||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <cstring>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
#include <string>
|
||||||
|
#include <thread>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <glob.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@@ -44,6 +48,69 @@ int _access(const char* path, int mode)
|
|||||||
return access(path, m);
|
return access(path, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
struct FindState
|
||||||
|
{
|
||||||
|
std::vector<std::string> paths;
|
||||||
|
size_t next = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
void fill_find_data(const std::string& path, WIN32_FIND_DATA* data)
|
||||||
|
{
|
||||||
|
const size_t slash = path.find_last_of('/');
|
||||||
|
const std::string name = path.substr(slash == std::string::npos ? 0 : slash + 1);
|
||||||
|
std::snprintf(data->cFileName, sizeof(data->cFileName), "%s", name.c_str());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HANDLE FindFirstFile(const char* pattern, WIN32_FIND_DATA* data)
|
||||||
|
{
|
||||||
|
if (!pattern || !data)
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
std::string normalized(pattern);
|
||||||
|
for (char& ch : normalized)
|
||||||
|
if (ch == '\\') ch = '/';
|
||||||
|
glob_t matches{};
|
||||||
|
const int result = glob(normalized.c_str(), 0, nullptr, &matches);
|
||||||
|
if (result != 0 || matches.gl_pathc == 0)
|
||||||
|
{
|
||||||
|
globfree(&matches);
|
||||||
|
return INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
|
auto* state = new FindState;
|
||||||
|
for (size_t i = 0; i < matches.gl_pathc; ++i)
|
||||||
|
state->paths.emplace_back(matches.gl_pathv[i]);
|
||||||
|
globfree(&matches);
|
||||||
|
fill_find_data(state->paths[0], data);
|
||||||
|
state->next = 1;
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL FindNextFile(HANDLE handle, WIN32_FIND_DATA* data)
|
||||||
|
{
|
||||||
|
if (handle == INVALID_HANDLE_VALUE || !handle || !data)
|
||||||
|
return FALSE;
|
||||||
|
auto* state = static_cast<FindState*>(handle);
|
||||||
|
if (state->next >= state->paths.size())
|
||||||
|
return FALSE;
|
||||||
|
fill_find_data(state->paths[state->next++], data);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL FindClose(HANDLE handle)
|
||||||
|
{
|
||||||
|
if (handle == INVALID_HANDLE_VALUE || !handle)
|
||||||
|
return FALSE;
|
||||||
|
delete static_cast<FindState*>(handle);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Sleep(DWORD milliseconds)
|
||||||
|
{
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(milliseconds));
|
||||||
|
}
|
||||||
|
|
||||||
char* _strlwr(char* s)
|
char* _strlwr(char* s)
|
||||||
{
|
{
|
||||||
for (char* p = s; *p; ++p)
|
for (char* p = s; *p; ++p)
|
||||||
|
|||||||
@@ -10,8 +10,15 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
|
#include <alloca.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
||||||
|
// The x87 precision-control call has no equivalent on ARM; the script never needs x87 state there.
|
||||||
|
#define _PC_24 0
|
||||||
|
#define _MCW_PC 0
|
||||||
|
inline unsigned _controlfp(unsigned, unsigned) { return 0; }
|
||||||
|
#define _alloca alloca
|
||||||
|
|
||||||
#include "Win32MinMax.h"
|
#include "Win32MinMax.h"
|
||||||
|
|
||||||
// mmsystem.h
|
// mmsystem.h
|
||||||
@@ -54,6 +61,12 @@ int _snprintf(char* buf, size_t count, const char* fmt, ...)
|
|||||||
BOOL CreateDirectory(LPCSTR path, void* security_attributes);
|
BOOL CreateDirectory(LPCSTR path, void* security_attributes);
|
||||||
BOOL DeleteFile(LPCSTR path);
|
BOOL DeleteFile(LPCSTR path);
|
||||||
int _access(const char* path, int mode);
|
int _access(const char* path, int mode);
|
||||||
|
struct WIN32_FIND_DATA { char cFileName[MAX_PATH]; };
|
||||||
|
#define INVALID_HANDLE_VALUE (reinterpret_cast<HANDLE>(static_cast<intptr_t>(-1)))
|
||||||
|
HANDLE FindFirstFile(const char* pattern, WIN32_FIND_DATA* data);
|
||||||
|
BOOL FindNextFile(HANDLE handle, WIN32_FIND_DATA* data);
|
||||||
|
BOOL FindClose(HANDLE handle);
|
||||||
|
void Sleep(DWORD milliseconds);
|
||||||
|
|
||||||
// winmm `timeGetTime`: milliseconds since system start, wrapping at 2^32.
|
// winmm `timeGetTime`: milliseconds since system start, wrapping at 2^32.
|
||||||
DWORD timeGetTime();
|
DWORD timeGetTime();
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
// DevIL interface needed by 40250 app.GetImageInfo / MarkImage.
|
||||||
|
typedef unsigned int ILuint;
|
||||||
|
|
||||||
|
#define IL_TYPE_UNKNOWN 0
|
||||||
|
#define IL_IMAGE_WIDTH 0x0DE4
|
||||||
|
#define IL_IMAGE_HEIGHT 0x0DE5
|
||||||
|
|
||||||
|
void ilGenImages(unsigned count, ILuint* images);
|
||||||
|
void ilBindImage(ILuint image);
|
||||||
|
bool ilLoad(unsigned type, const char* filename);
|
||||||
|
int ilGetInteger(unsigned property);
|
||||||
|
void ilDeleteImages(unsigned count, const ILuint* images);
|
||||||
@@ -11,3 +11,118 @@ struct IDirectInput8;
|
|||||||
struct IDirectInputDevice8;
|
struct IDirectInputDevice8;
|
||||||
typedef IDirectInput8* LPDIRECTINPUT8;
|
typedef IDirectInput8* LPDIRECTINPUT8;
|
||||||
typedef IDirectInputDevice8* LPDIRECTINPUTDEVICE8;
|
typedef IDirectInputDevice8* LPDIRECTINPUTDEVICE8;
|
||||||
|
|
||||||
|
// DirectInput scan codes used by PythonApplicationModule.cpp, from mingw-w64 dinput.h.
|
||||||
|
#define DIK_0 0x0B
|
||||||
|
#define DIK_1 0x02
|
||||||
|
#define DIK_2 0x03
|
||||||
|
#define DIK_3 0x04
|
||||||
|
#define DIK_4 0x05
|
||||||
|
#define DIK_5 0x06
|
||||||
|
#define DIK_6 0x07
|
||||||
|
#define DIK_7 0x08
|
||||||
|
#define DIK_8 0x09
|
||||||
|
#define DIK_9 0x0A
|
||||||
|
#define DIK_A 0x1E
|
||||||
|
#define DIK_ADD 0x4E
|
||||||
|
#define DIK_APOSTROPHE 0x28
|
||||||
|
#define DIK_APPS 0xDD
|
||||||
|
#define DIK_B 0x30
|
||||||
|
#define DIK_BACK 0x0E
|
||||||
|
#define DIK_BACKSLASH 0x2B
|
||||||
|
#define DIK_C 0x2E
|
||||||
|
#define DIK_CALCULATOR 0xA1
|
||||||
|
#define DIK_CAPITAL 0x3A
|
||||||
|
#define DIK_COMMA 0x33
|
||||||
|
#define DIK_D 0x20
|
||||||
|
#define DIK_DECIMAL 0x53
|
||||||
|
#define DIK_DELETE 0xD3
|
||||||
|
#define DIK_DIVIDE 0xB5
|
||||||
|
#define DIK_DOWN 0xD0
|
||||||
|
#define DIK_E 0x12
|
||||||
|
#define DIK_END 0xCF
|
||||||
|
#define DIK_EQUALS 0x0D
|
||||||
|
#define DIK_ESCAPE 0x01
|
||||||
|
#define DIK_F 0x21
|
||||||
|
#define DIK_F1 0x3B
|
||||||
|
#define DIK_F10 0x44
|
||||||
|
#define DIK_F11 0x57
|
||||||
|
#define DIK_F12 0x58
|
||||||
|
#define DIK_F2 0x3C
|
||||||
|
#define DIK_F3 0x3D
|
||||||
|
#define DIK_F4 0x3E
|
||||||
|
#define DIK_F5 0x3F
|
||||||
|
#define DIK_F6 0x40
|
||||||
|
#define DIK_F7 0x41
|
||||||
|
#define DIK_F8 0x42
|
||||||
|
#define DIK_F9 0x43
|
||||||
|
#define DIK_G 0x22
|
||||||
|
#define DIK_GRAVE 0x29
|
||||||
|
#define DIK_H 0x23
|
||||||
|
#define DIK_HOME 0xC7
|
||||||
|
#define DIK_I 0x17
|
||||||
|
#define DIK_INSERT 0xD2
|
||||||
|
#define DIK_J 0x24
|
||||||
|
#define DIK_K 0x25
|
||||||
|
#define DIK_L 0x26
|
||||||
|
#define DIK_LBRACKET 0x1A
|
||||||
|
#define DIK_LCONTROL 0x1D
|
||||||
|
#define DIK_LEFT 0xCB
|
||||||
|
#define DIK_LMENU 0x38
|
||||||
|
#define DIK_LSHIFT 0x2A
|
||||||
|
#define DIK_LWIN 0xDB
|
||||||
|
#define DIK_M 0x32
|
||||||
|
#define DIK_MEDIASTOP 0xA4
|
||||||
|
#define DIK_MINUS 0x0C
|
||||||
|
#define DIK_MULTIPLY 0x37
|
||||||
|
#define DIK_MUTE 0xA0
|
||||||
|
#define DIK_N 0x31
|
||||||
|
#define DIK_NEXT 0xD1
|
||||||
|
#define DIK_NEXTTRACK 0x99
|
||||||
|
#define DIK_NUMLOCK 0x45
|
||||||
|
#define DIK_NUMPAD0 0x52
|
||||||
|
#define DIK_NUMPAD1 0x4F
|
||||||
|
#define DIK_NUMPAD2 0x50
|
||||||
|
#define DIK_NUMPAD3 0x51
|
||||||
|
#define DIK_NUMPAD4 0x4B
|
||||||
|
#define DIK_NUMPAD5 0x4C
|
||||||
|
#define DIK_NUMPAD6 0x4D
|
||||||
|
#define DIK_NUMPAD7 0x47
|
||||||
|
#define DIK_NUMPAD8 0x48
|
||||||
|
#define DIK_NUMPAD9 0x49
|
||||||
|
#define DIK_NUMPADCOMMA 0xB3
|
||||||
|
#define DIK_NUMPADENTER 0x9C
|
||||||
|
#define DIK_O 0x18
|
||||||
|
#define DIK_P 0x19
|
||||||
|
#define DIK_PAUSE 0xC5
|
||||||
|
#define DIK_PERIOD 0x34
|
||||||
|
#define DIK_PLAYPAUSE 0xA2
|
||||||
|
#define DIK_PRIOR 0xC9
|
||||||
|
#define DIK_Q 0x10
|
||||||
|
#define DIK_R 0x13
|
||||||
|
#define DIK_RBRACKET 0x1B
|
||||||
|
#define DIK_RCONTROL 0x9D
|
||||||
|
#define DIK_RETURN 0x1C
|
||||||
|
#define DIK_RIGHT 0xCD
|
||||||
|
#define DIK_RMENU 0xB8
|
||||||
|
#define DIK_RSHIFT 0x36
|
||||||
|
#define DIK_RWIN 0xDC
|
||||||
|
#define DIK_S 0x1F
|
||||||
|
#define DIK_SCROLL 0x46
|
||||||
|
#define DIK_SEMICOLON 0x27
|
||||||
|
#define DIK_SLASH 0x35
|
||||||
|
#define DIK_SPACE 0x39
|
||||||
|
#define DIK_SUBTRACT 0x4A
|
||||||
|
#define DIK_SYSRQ 0xB7
|
||||||
|
#define DIK_T 0x14
|
||||||
|
#define DIK_TAB 0x0F
|
||||||
|
#define DIK_U 0x16
|
||||||
|
#define DIK_UP 0xC8
|
||||||
|
#define DIK_V 0x2F
|
||||||
|
#define DIK_VOLUMEDOWN 0xAE
|
||||||
|
#define DIK_VOLUMEUP 0xB0
|
||||||
|
#define DIK_W 0x11
|
||||||
|
#define DIK_WEBHOME 0xB2
|
||||||
|
#define DIK_X 0x2D
|
||||||
|
#define DIK_Y 0x15
|
||||||
|
#define DIK_Z 0x2C
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#pragma once
|
||||||
|
// Win32 shell-folder API used only by the screenshot command in grp.
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define CSIDL_PERSONAL 0x0005
|
||||||
|
|
||||||
|
inline BOOL SHGetSpecialFolderPath(void*, char* path, int, BOOL)
|
||||||
|
{
|
||||||
|
if (path)
|
||||||
|
path[0] = '\0';
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
@@ -17,3 +17,11 @@
|
|||||||
#define WHITE_BRUSH 0
|
#define WHITE_BRUSH 0
|
||||||
#define BLACK_BRUSH 4
|
#define BLACK_BRUSH 4
|
||||||
#define KL_NAMELENGTH 9
|
#define KL_NAMELENGTH 9
|
||||||
|
#define FAR
|
||||||
|
#define VK_LEFT 0x25
|
||||||
|
#define VK_UP 0x26
|
||||||
|
#define VK_RIGHT 0x27
|
||||||
|
#define VK_DOWN 0x28
|
||||||
|
#define VK_HOME 0x24
|
||||||
|
#define VK_END 0x23
|
||||||
|
#define VK_DELETE 0x2E
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#include "EterPythonLib/StdAfx.h"
|
||||||
|
#include "EterPythonLib/PythonWindowManager.h"
|
||||||
|
#include "ScriptLib/PythonLauncher.h"
|
||||||
|
#include "UserInterface/StdAfx.h"
|
||||||
|
extern void initapp();
|
||||||
|
#include "../src/platform/ScriptLib/PythonHost.h"
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
const std::string stdlib = argc > 1 ? argv[1] : PythonHost::DefaultStdLibPath();
|
||||||
|
PythonHost::Configure();
|
||||||
|
CPythonLauncher launcher;
|
||||||
|
if (!launcher.Create())
|
||||||
|
return 1;
|
||||||
|
std::string error;
|
||||||
|
if (!PythonHost::InstallStdLib(stdlib.c_str(), &error))
|
||||||
|
{
|
||||||
|
std::fprintf(stderr, "InstallStdLib: %s\n", error.c_str());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
UI::CWindowManager manager;
|
||||||
|
initgrp();
|
||||||
|
initgrpImage();
|
||||||
|
initgrpText();
|
||||||
|
initgrpThing();
|
||||||
|
initwndMgr();
|
||||||
|
initapp();
|
||||||
|
if (!launcher.RunLine("import wndMgr, grp, grpImage, grpText, grpThing, app"))
|
||||||
|
return 1;
|
||||||
|
if (!launcher.RunLine(
|
||||||
|
"class Handler: pass\n"
|
||||||
|
"window = wndMgr.Register(Handler(), 'UI')\n"
|
||||||
|
"assert window > 0\n"
|
||||||
|
"wndMgr.SetName(window, 'roundtrip')\n"
|
||||||
|
"wndMgr.SetWindowSize(window, 100, 50)\n"
|
||||||
|
"assert wndMgr.GetWindowWidth(window) == 100\n"
|
||||||
|
"wndMgr.Destroy(window)\n"))
|
||||||
|
return 1;
|
||||||
|
manager.Update();
|
||||||
|
}
|
||||||
|
launcher.Clear();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# 和 ctest 的 `port.python_launcher` 跑的是同一条序列,区别只有一个:那边是独立可执行文件,这边在
|
# 和 ctest 的 `port.python_launcher` 跑的是同一条序列,区别只有一个:那边是独立可执行文件,这边在
|
||||||
# Godot 进程里,由 GDScript 发起 —— step 4 要验的就是这个差别。2V0 把 C++ 模块注册上之前,
|
# Godot 进程里,由 GDScript 发起 —— step 4 要验的就是这个差别。2V0 把 C++ 模块注册上之前,
|
||||||
# system.py 停在第一个 import(`No module named app`),这就是当前的验收结果。
|
# 在玩法模块补齐前,system.py 会停在下一个未注册的 native import。
|
||||||
#
|
#
|
||||||
# 真机上通常没有 40250 的 Client/pack(APK 里只有 python27.zip),所以分两段:解释器 + 标准库这一段
|
# 真机上通常没有 40250 的 Client/pack(APK 里只有 python27.zip),所以分两段:解释器 + 标准库这一段
|
||||||
# 不需要 pack,任何平台都跑;system.py 这一段需要 pack,没有就跳过并说清楚。
|
# 不需要 pack,任何平台都跑;system.py 这一段需要 pack,没有就跳过并说清楚。
|
||||||
@@ -10,8 +10,7 @@
|
|||||||
# 桌面:python_host_test.gd(--script);真机:MT_TEST_MODE=python 从 client_main.gd 进来。
|
# 桌面:python_host_test.gd(--script);真机:MT_TEST_MODE=python 从 client_main.gd 进来。
|
||||||
extends RefCounted
|
extends RefCounted
|
||||||
|
|
||||||
# 2V0 之前 system.py 必然停在这里;2V0 之后这一行要跟着改。
|
const EXPECTED_STOP := "No module named net"
|
||||||
const EXPECTED_STOP := "No module named app"
|
|
||||||
|
|
||||||
var fail := 0
|
var fail := 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user