port: P3-e PythonMiniMap + miniMap module (1:1 40250)
Copy PythonMiniMap.cpp/PythonMiniMapModule.cpp and PRTerrainLib/StdAfx.cpp verbatim, drop the pending stand-in and the miniMap module stub, register initMiniMap() after initnet(). PR_FLOAT_TO_INTASM uses lrintf off MSVC; D3DXColorModulate added. CMapOutdoor is not ported, so the pending CMapManager::IsMapOutdoor() returns false (DIVERGENT) and the minimap's terrain and atlas paths stay on 40250's no-outdoor-map branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
070a27b2cb
commit
7358bf444a
@@ -534,3 +534,4 @@
|
|||||||
{"time": "2026-09-24T07:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-b: PythonItem + PythonItemModule", "ported": ["UserInterface/PythonItem.cpp", "UserInterface/PythonItemModule.cpp"], "adapted": ["UserInterface/PythonItemModule.cpp:itemGetIconImage", "GameLib/MapManager.cpp:CMapManager::GetNormal"], "divergent": [], "needs_live": [], "tests": ["port.login_flow: fake GC_ITEM_GROUND_ADD vnum 19 + ownership, player.PickCloseItem -> CG_ITEM_PICKUP -> GC_ITEM_GROUND_DEL removes it", "port.login_flow: item.SelectItem(19) name/type/subtype/value", "port.login_live 192.168.21.203: passes (icon pointer truncation segfault fixed)", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["P3-c PythonExchange", "PythonTextTail item tails (Register/Delete/SetOwner/Pick still stubs)", "CEffectManager (dropitem.mse)"]}
|
{"time": "2026-09-24T07:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-b: PythonItem + PythonItemModule", "ported": ["UserInterface/PythonItem.cpp", "UserInterface/PythonItemModule.cpp"], "adapted": ["UserInterface/PythonItemModule.cpp:itemGetIconImage", "GameLib/MapManager.cpp:CMapManager::GetNormal"], "divergent": [], "needs_live": [], "tests": ["port.login_flow: fake GC_ITEM_GROUND_ADD vnum 19 + ownership, player.PickCloseItem -> CG_ITEM_PICKUP -> GC_ITEM_GROUND_DEL removes it", "port.login_flow: item.SelectItem(19) name/type/subtype/value", "port.login_live 192.168.21.203: passes (icon pointer truncation segfault fixed)", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["P3-c PythonExchange", "PythonTextTail item tails (Register/Delete/SetOwner/Pick still stubs)", "CEffectManager (dropitem.mse)"]}
|
||||||
{"time": "2026-09-24T08:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-c: PythonExchange + PythonExchangeModule", "ported": ["UserInterface/PythonExchange.cpp", "UserInterface/PythonExchangeModule.cpp"], "adapted": [], "divergent": [], "needs_live": ["exchange with a real second player"], "tests": ["port.login_flow: net.SendExchangeStartPacket -> fake GC_EXCHANGE START/ITEM_ADD/GOLD_ADD fills target side, uiexchange opens; SendExchangeExitPacket -> END closes", "port.login_live 192.168.21.203: passes", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["PythonTextTail item tails", "PythonMiniMap", "CEffectManager", "CPythonSkill"]}
|
{"time": "2026-09-24T08:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-c: PythonExchange + PythonExchangeModule", "ported": ["UserInterface/PythonExchange.cpp", "UserInterface/PythonExchangeModule.cpp"], "adapted": [], "divergent": [], "needs_live": ["exchange with a real second player"], "tests": ["port.login_flow: net.SendExchangeStartPacket -> fake GC_EXCHANGE START/ITEM_ADD/GOLD_ADD fills target side, uiexchange opens; SendExchangeExitPacket -> END closes", "port.login_live 192.168.21.203: passes", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["PythonTextTail item tails", "PythonMiniMap", "CEffectManager", "CPythonSkill"]}
|
||||||
{"time": "2026-09-24T09:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-d: PythonTextTail + textTail module", "ported": ["UserInterface/PythonTextTail.cpp", "UserInterface/PythonTextTailModule.cpp"], "adapted": ["EterLib/GrpScreen.cpp:CScreen::ProjectPosition", "EterLib/GrpScreen.cpp:CScreen::UnprojectPosition", "UserInterface/UserInterface.cpp:ApplicationStringTable_GetString", "UserInterface/UserInterface.cpp:ApplicationStringTable_GetStringz"], "divergent": [], "needs_live": [], "tests": ["port.login_flow: ground item name tail registered, ALT frame projects it, CPythonTextTail::Pick returns the item VID, deleted on pickup", "port.login_live 192.168.21.203: passes", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["PythonMiniMap", "CEffectManager", "CPythonSkill"]}
|
{"time": "2026-09-24T09:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-d: PythonTextTail + textTail module", "ported": ["UserInterface/PythonTextTail.cpp", "UserInterface/PythonTextTailModule.cpp"], "adapted": ["EterLib/GrpScreen.cpp:CScreen::ProjectPosition", "EterLib/GrpScreen.cpp:CScreen::UnprojectPosition", "UserInterface/UserInterface.cpp:ApplicationStringTable_GetString", "UserInterface/UserInterface.cpp:ApplicationStringTable_GetStringz"], "divergent": [], "needs_live": [], "tests": ["port.login_flow: ground item name tail registered, ALT frame projects it, CPythonTextTail::Pick returns the item VID, deleted on pickup", "port.login_live 192.168.21.203: passes", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["PythonMiniMap", "CEffectManager", "CPythonSkill"]}
|
||||||
|
{"time": "2026-09-24T10:00:00Z", "event": "port_round", "unit": "PORT-PLAN batch 2 P3-e: PythonMiniMap + miniMap module", "ported": ["UserInterface/PythonMiniMap.cpp", "UserInterface/PythonMiniMapModule.cpp", "PRTerrainLib/StdAfx.cpp"], "adapted": [], "divergent": ["GameLib/MapManager.cpp:CMapManager::IsMapOutdoor (false until CMapOutdoor is ported)"], "needs_live": [], "tests": ["port.login_flow: miniMap.isShow() after uiminimap, GetAtlasSize() not loaded", "port.login_live 192.168.21.203: passes", "ctest all 19/19, python_game_render_test offline PASS", "port_map.py check: 0 errors"], "todo": ["CMapOutdoor (minimap terrain textures, atlas)", "CEffectManager", "CPythonSkill"]}
|
||||||
|
|||||||
@@ -5,7 +5,12 @@
|
|||||||
"contracts": [],
|
"contracts": [],
|
||||||
"functions": {
|
"functions": {
|
||||||
"CMapManager::IsMapOutdoor": {
|
"CMapManager::IsMapOutdoor": {
|
||||||
"status": "TODO"
|
"status": "DIVERGENT",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/platform/pending/GameLib/MapManager.cpp:CMapManager::IsMapOutdoor"
|
||||||
|
],
|
||||||
|
"note": "Returns false on every map: CMapOutdoor is not ported (the Godot terrain adapter draws the map), so CPythonMiniMap Update/Render/LoadAtlas take their no-outdoor-map path: no minimap terrain textures, marks or atlas. Resolves when CMapOutdoor is ported.",
|
||||||
|
"test": "extension/tests/port_login_flow_test.cpp miniMap step (miniMap.GetAtlasSize() reports not loaded)"
|
||||||
},
|
},
|
||||||
"CMapManager::GetMapOutdoorRef": {
|
"CMapManager::GetMapOutdoorRef": {
|
||||||
"status": "TODO"
|
"status": "TODO"
|
||||||
|
|||||||
@@ -0,0 +1,320 @@
|
|||||||
|
{
|
||||||
|
"reference": "UserInterface/PythonMiniMap.cpp",
|
||||||
|
"reference_sha256": "bc931ed36fd90f631ee8c287cdf3816d58e9ee640511afc36ac2a684d69de738",
|
||||||
|
"priority": "P3",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"CPythonMiniMap::AddObserver": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::AddObserver"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::MoveObserver": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::MoveObserver"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RemoveObserver": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RemoveObserver"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::SetCenterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::SetCenterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Update": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Update"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Render": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Render"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::SetScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::SetScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ScaleUp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ScaleUp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ScaleDown": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ScaleDown"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::SetMiniMapSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::SetMiniMapSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Create": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Create"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__SetPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__SetPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ClearAtlasMarkInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ClearAtlasMarkInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RegisterAtlasMark": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RegisterAtlasMark"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ClearGuildArea": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ClearGuildArea"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RegisterGuildArea": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RegisterGuildArea"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::GetGuildAreaID": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::GetGuildAreaID"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::CreateTarget": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::CreateTarget"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::UpdateTarget": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::UpdateTarget"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::DeleteTarget": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::DeleteTarget"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__LoadAtlasMarkInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__LoadAtlasMarkInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::LoadAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::LoadAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__GlobalPositionToAtlasPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__GlobalPositionToAtlasPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::UpdateAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::UpdateAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RenderAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RenderAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::GetPickedInstanceInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::GetPickedInstanceInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::GetAtlasInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::GetAtlasInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::GetAtlasSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::GetAtlasSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::AddWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::AddWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RemoveWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RemoveWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__GetWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__GetWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__UpdateWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__UpdateWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__RenderWayPointMark": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__RenderWayPointMark"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__RenderMiniWayPointMark": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__RenderMiniWayPointMark"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__RenderTargetMark": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__RenderTargetMark"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::AddSignalPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::AddSignalPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ClearAllSignalPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ClearAllSignalPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::RegisterAtlasWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::RegisterAtlasWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::UnregisterAtlasWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::UnregisterAtlasWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::OpenAtlasWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::OpenAtlasWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::SetAtlasCenterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::SetAtlasCenterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::IsAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::IsAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::ShowAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::ShowAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::HideAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::HideAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::CanShowAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::CanShowAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::CanShow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::CanShow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Show": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Show"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Hide": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Hide"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::__Initialize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::__Initialize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::Destroy": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::Destroy"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::CPythonMiniMap": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::CPythonMiniMap"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"CPythonMiniMap::~CPythonMiniMap": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMap.cpp:CPythonMiniMap::~CPythonMiniMap"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,176 @@
|
|||||||
|
{
|
||||||
|
"reference": "UserInterface/PythonMiniMapModule.cpp",
|
||||||
|
"reference_sha256": "49293a3eacbb0118f611968a2f6f635cdba66a7db63630330768006d007a6c32",
|
||||||
|
"priority": "P4",
|
||||||
|
"contracts": [],
|
||||||
|
"functions": {
|
||||||
|
"miniMapSetScale": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapSetScale"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapSetCenterPosition": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapSetCenterPosition"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapSetMiniMapSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapSetMiniMapSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapDestroy": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapDestroy"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapCreate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapCreate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapUpdate": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapUpdate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapRender": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapRender"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapShow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapShow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapHide": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapHide"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapisShow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapisShow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapScaleUp": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapScaleUp"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapScaleDown": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapScaleDown"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapGetInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapGetInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapLoadAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapLoadAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapUpdateAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapUpdateAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapRenderAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapRenderAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapShowAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapShowAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapHideAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapHideAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapisShowAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapisShowAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapIsAtlas": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapIsAtlas"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapGetAtlasInfo": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapGetAtlasInfo"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapGetAtlasSize": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapGetAtlasSize"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapAddWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapAddWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapRemoveWayPoint": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapRemoveWayPoint"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapRegisterAtlasWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapRegisterAtlasWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapUnregisterAtlasWindow": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapUnregisterAtlasWindow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"miniMapGetGuildAreaID": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:miniMapGetGuildAreaID"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"initMiniMap": {
|
||||||
|
"status": "PORTED",
|
||||||
|
"impl": [
|
||||||
|
"extension/src/port/UserInterface/PythonMiniMapModule.cpp:initMiniMap"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -442,6 +442,8 @@ extension/third_party/cpython-2.7.18/ # 静态库(2P 批次
|
|||||||
|
|
||||||
P3-d(2026-09-24):`PythonTextTail.cpp` 与 `PythonTextTailModule.cpp` 原样移植(无手改),删除 pending 替身(含 P3-b 的物品名牌桩)、textTail 模块桩与 `TextTail_SetLivingTime` 桩,`initTextTail()` 按 40250 顺序在 `initChat()` 之后,平台 `CPythonApplication::Create` 按原序调 `CPythonTextTail::Initialize()`。连带补齐:`CScreen::ProjectPosition/UnprojectPosition` 原样实现(此前是桩,名牌永远停在 -100,-100),`D3DXMath` 补 `D3DXVec3Project/Unproject`(D3DX 语义);`ApplicationStringTable_GetString(z)(DWORD)` 在平台 `UserInterface.cpp` 以 UserInterface.rc 英文 STRINGTABLE 代替 `LoadString`(物品归属名 "'s"),记 ADAPTED。`port.login_flow` 验证:假服地面物品注册了物品名牌(ItemTail Map 1),按住 ALT 一帧后 `game.GameWindow.OnRender` 在 `app.RenderGame` 之后投影名牌,`CPythonTextTail::Pick` 在屏幕上找回该物品 VID;拾取后名牌删除。下一步 `PythonMiniMap`。
|
P3-d(2026-09-24):`PythonTextTail.cpp` 与 `PythonTextTailModule.cpp` 原样移植(无手改),删除 pending 替身(含 P3-b 的物品名牌桩)、textTail 模块桩与 `TextTail_SetLivingTime` 桩,`initTextTail()` 按 40250 顺序在 `initChat()` 之后,平台 `CPythonApplication::Create` 按原序调 `CPythonTextTail::Initialize()`。连带补齐:`CScreen::ProjectPosition/UnprojectPosition` 原样实现(此前是桩,名牌永远停在 -100,-100),`D3DXMath` 补 `D3DXVec3Project/Unproject`(D3DX 语义);`ApplicationStringTable_GetString(z)(DWORD)` 在平台 `UserInterface.cpp` 以 UserInterface.rc 英文 STRINGTABLE 代替 `LoadString`(物品归属名 "'s"),记 ADAPTED。`port.login_flow` 验证:假服地面物品注册了物品名牌(ItemTail Map 1),按住 ALT 一帧后 `game.GameWindow.OnRender` 在 `app.RenderGame` 之后投影名牌,`CPythonTextTail::Pick` 在屏幕上找回该物品 VID;拾取后名牌删除。下一步 `PythonMiniMap`。
|
||||||
|
|
||||||
|
P3-e(2026-09-24):`PythonMiniMap.cpp` 与 `PythonMiniMapModule.cpp` 原样移植(无手改),删除 pending 替身与 miniMap 模块桩,`initMiniMap()` 按 40250 顺序在 `initnet()` 之后;`PRTerrainLib/StdAfx.cpp`(`PR_FCNV/PR_ICNV`)原样复制,UserInterface PCH 按 40250 补 `PRTerrainLib/StdAfx.h`,`TerrainType.h` 的 `PR_FLOAT_TO_INTASM` 在非 MSVC 下用 `lrintf`(x87 fistp 默认舍入)代替内联汇编;`D3DXMath.h` 补 `D3DXColorModulate`。缺口:`CMapOutdoor` 未移植(地形由 Godot 适配层绘制),pending `CMapManager::IsMapOutdoor()` 返回 false(记 DIVERGENT),`GetMapOutdoorRef` 与 pending `CMapOutdoor::GetTerrainPointer/GetBaseXY` 只为链接存在、不可达——小地图地形贴图、标记与大地图(atlas)因此走 40250「非室外地图」路径不显示,待 `CMapOutdoor` 移植后自然恢复。`port.login_flow` 验证 uiminimap 创建并显示 miniMap、`GetAtlasSize()` 报未载入。P3 物品链与三个 UI 单元至此完成;下一步候选:`CMapOutdoor`(解锁小地图/大地图)、`CEffectManager`/EffectLib、`CPythonSkill`。
|
||||||
|
|
||||||
每个切片都必须同时跑 legacy/port 双路回归;只有 2V3 稳定并把默认路由切到 `port` 后,才能删除总开关和剩余 legacy 宿主。
|
每个切片都必须同时跑 legacy/port 双路回归;只有 2V3 稳定并把默认路由切到 `port` 后,才能删除总开关和剩余 legacy 宿主。
|
||||||
|
|
||||||
## 5. 数据源切换:m2dev assets → 40250
|
## 5. 数据源切换:m2dev assets → 40250
|
||||||
|
|||||||
@@ -104,21 +104,6 @@ void AddStubConstants_messenger(PyObject* poModule)
|
|||||||
(void) poModule;
|
(void) poModule;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 40250 UserInterface/PythonMiniMapModule.cpp
|
|
||||||
void AddStubConstants_miniMap(PyObject* poModule)
|
|
||||||
{
|
|
||||||
(void) poModule;
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_OPC", CPythonMiniMap::TYPE_OPC);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_OPCPVP", CPythonMiniMap::TYPE_OPCPVP);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_OPCPVPSELF", CPythonMiniMap::TYPE_OPCPVPSELF);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_NPC", CPythonMiniMap::TYPE_NPC);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_MONSTER", CPythonMiniMap::TYPE_MONSTER);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_WARP", CPythonMiniMap::TYPE_WARP);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_WAYPOINT", CPythonMiniMap::TYPE_WAYPOINT);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_PARTY", CPythonMiniMap::TYPE_PARTY);
|
|
||||||
PyModule_AddIntConstant(poModule, "TYPE_EMPIRE", CPythonMiniMap::TYPE_EMPIRE);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 40250 UserInterface/PythonProfilerModule.cpp
|
// 40250 UserInterface/PythonProfilerModule.cpp
|
||||||
void AddStubConstants_profiler(PyObject* poModule)
|
void AddStubConstants_profiler(PyObject* poModule)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ void AddStubConstants_eventMgr(PyObject* poModule);
|
|||||||
void AddStubConstants_guild(PyObject* poModule);
|
void AddStubConstants_guild(PyObject* poModule);
|
||||||
void AddStubConstants_ime(PyObject* poModule);
|
void AddStubConstants_ime(PyObject* poModule);
|
||||||
void AddStubConstants_messenger(PyObject* poModule);
|
void AddStubConstants_messenger(PyObject* poModule);
|
||||||
void AddStubConstants_miniMap(PyObject* poModule);
|
|
||||||
void AddStubConstants_profiler(PyObject* poModule);
|
void AddStubConstants_profiler(PyObject* poModule);
|
||||||
void AddStubConstants_quest(PyObject* poModule);
|
void AddStubConstants_quest(PyObject* poModule);
|
||||||
void AddStubConstants_safebox(PyObject* poModule);
|
void AddStubConstants_safebox(PyObject* poModule);
|
||||||
@@ -341,64 +340,6 @@ PyMethodDef methods_messenger[] = {
|
|||||||
{ "SetMessengerHandler", stub_messenger_SetMessengerHandler, METH_VARARGS },
|
{ "SetMessengerHandler", stub_messenger_SetMessengerHandler, METH_VARARGS },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
// 40250 UserInterface/PythonMiniMapModule.cpp: miniMap export names.
|
|
||||||
PyObject* stub_miniMap_SetScale(PyObject*, PyObject*) { return stub_call_named("miniMap.SetScale", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_ScaleUp(PyObject*, PyObject*) { return stub_call_named("miniMap.ScaleUp", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_ScaleDown(PyObject*, PyObject*) { return stub_call_named("miniMap.ScaleDown", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_SetMiniMapSize(PyObject*, PyObject*) { return stub_call_named("miniMap.SetMiniMapSize", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_SetCenterPosition(PyObject*, PyObject*) { return stub_call_named("miniMap.SetCenterPosition", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Destroy(PyObject*, PyObject*) { return stub_call_named("miniMap.Destroy", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Create(PyObject*, PyObject*) { return stub_call_named("miniMap.Create", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Update(PyObject*, PyObject*) { return stub_call_named("miniMap.Update", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Render(PyObject*, PyObject*) { return stub_call_named("miniMap.Render", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Show(PyObject*, PyObject*) { return stub_call_named("miniMap.Show", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_Hide(PyObject*, PyObject*) { return stub_call_named("miniMap.Hide", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_isShow(PyObject*, PyObject*) { return stub_call_named("miniMap.isShow", Py_BuildValue("b", 0)); }
|
|
||||||
PyObject* stub_miniMap_GetInfo(PyObject*, PyObject*) { return stub_call_named("miniMap.GetInfo", Py_BuildValue("isiil", 0, "", 0, 0, 0L)); }
|
|
||||||
PyObject* stub_miniMap_LoadAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.LoadAtlas", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_UpdateAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.UpdateAtlas", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_RenderAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.RenderAtlas", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_ShowAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.ShowAtlas", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_HideAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.HideAtlas", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_isShowAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.isShowAtlas", Py_BuildValue("b", 0)); }
|
|
||||||
PyObject* stub_miniMap_IsAtlas(PyObject*, PyObject*) { return stub_call_named("miniMap.IsAtlas", Py_BuildValue("b", 0)); }
|
|
||||||
PyObject* stub_miniMap_GetAtlasInfo(PyObject*, PyObject*) { return stub_call_named("miniMap.GetAtlasInfo", Py_BuildValue("isiili", 0, "", 0, 0, 0L, 0)); }
|
|
||||||
PyObject* stub_miniMap_GetAtlasSize(PyObject*, PyObject*) { return stub_call_named("miniMap.GetAtlasSize", Py_BuildValue("bii", 0, 0, 0)); }
|
|
||||||
PyObject* stub_miniMap_AddWayPoint(PyObject*, PyObject*) { return stub_call_named("miniMap.AddWayPoint", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_RemoveWayPoint(PyObject*, PyObject*) { return stub_call_named("miniMap.RemoveWayPoint", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_RegisterAtlasWindow(PyObject*, PyObject*) { return stub_call_named("miniMap.RegisterAtlasWindow", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_UnregisterAtlasWindow(PyObject*, PyObject*) { return stub_call_named("miniMap.UnregisterAtlasWindow", Py_BuildNone()); }
|
|
||||||
PyObject* stub_miniMap_GetGuildAreaID(PyObject*, PyObject*) { return stub_call_named("miniMap.GetGuildAreaID", Py_BuildValue("i", 0)); }
|
|
||||||
PyMethodDef methods_miniMap[] = {
|
|
||||||
{ "SetScale", stub_miniMap_SetScale, METH_VARARGS },
|
|
||||||
{ "ScaleUp", stub_miniMap_ScaleUp, METH_VARARGS },
|
|
||||||
{ "ScaleDown", stub_miniMap_ScaleDown, METH_VARARGS },
|
|
||||||
{ "SetMiniMapSize", stub_miniMap_SetMiniMapSize, METH_VARARGS },
|
|
||||||
{ "SetCenterPosition", stub_miniMap_SetCenterPosition, METH_VARARGS },
|
|
||||||
{ "Destroy", stub_miniMap_Destroy, METH_VARARGS },
|
|
||||||
{ "Create", stub_miniMap_Create, METH_VARARGS },
|
|
||||||
{ "Update", stub_miniMap_Update, METH_VARARGS },
|
|
||||||
{ "Render", stub_miniMap_Render, METH_VARARGS },
|
|
||||||
{ "Show", stub_miniMap_Show, METH_VARARGS },
|
|
||||||
{ "Hide", stub_miniMap_Hide, METH_VARARGS },
|
|
||||||
{ "isShow", stub_miniMap_isShow, METH_VARARGS },
|
|
||||||
{ "GetInfo", stub_miniMap_GetInfo, METH_VARARGS },
|
|
||||||
{ "LoadAtlas", stub_miniMap_LoadAtlas, METH_VARARGS },
|
|
||||||
{ "UpdateAtlas", stub_miniMap_UpdateAtlas, METH_VARARGS },
|
|
||||||
{ "RenderAtlas", stub_miniMap_RenderAtlas, METH_VARARGS },
|
|
||||||
{ "ShowAtlas", stub_miniMap_ShowAtlas, METH_VARARGS },
|
|
||||||
{ "HideAtlas", stub_miniMap_HideAtlas, METH_VARARGS },
|
|
||||||
{ "isShowAtlas", stub_miniMap_isShowAtlas, METH_VARARGS },
|
|
||||||
{ "IsAtlas", stub_miniMap_IsAtlas, METH_VARARGS },
|
|
||||||
{ "GetAtlasInfo", stub_miniMap_GetAtlasInfo, METH_VARARGS },
|
|
||||||
{ "GetAtlasSize", stub_miniMap_GetAtlasSize, METH_VARARGS },
|
|
||||||
{ "AddWayPoint", stub_miniMap_AddWayPoint, METH_VARARGS },
|
|
||||||
{ "RemoveWayPoint", stub_miniMap_RemoveWayPoint, METH_VARARGS },
|
|
||||||
{ "RegisterAtlasWindow", stub_miniMap_RegisterAtlasWindow, METH_VARARGS },
|
|
||||||
{ "UnregisterAtlasWindow", stub_miniMap_UnregisterAtlasWindow, METH_VARARGS },
|
|
||||||
{ "GetGuildAreaID", stub_miniMap_GetGuildAreaID, METH_VARARGS },
|
|
||||||
{ NULL, NULL }
|
|
||||||
};
|
|
||||||
// 40250 UserInterface/PythonProfilerModule.cpp: profiler export names.
|
// 40250 UserInterface/PythonProfilerModule.cpp: profiler export names.
|
||||||
PyObject* stub_profiler_Push(PyObject*, PyObject*) { return stub_call_named("profiler.Push", Py_BuildNone()); }
|
PyObject* stub_profiler_Push(PyObject*, PyObject*) { return stub_call_named("profiler.Push", Py_BuildNone()); }
|
||||||
PyObject* stub_profiler_Pop(PyObject*, PyObject*) { return stub_call_named("profiler.Pop", Py_BuildNone()); }
|
PyObject* stub_profiler_Pop(PyObject*, PyObject*) { return stub_call_named("profiler.Pop", Py_BuildNone()); }
|
||||||
@@ -731,11 +672,6 @@ void init_2v0_gameplay_stubs() {
|
|||||||
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
||||||
AddStubConstants_messenger(module);
|
AddStubConstants_messenger(module);
|
||||||
}
|
}
|
||||||
{
|
|
||||||
PyObject* module = Py_InitModule("miniMap", methods_miniMap);
|
|
||||||
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
|
||||||
AddStubConstants_miniMap(module);
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
PyObject* module = Py_InitModule("profiler", methods_profiler);
|
PyObject* module = Py_InitModule("profiler", methods_profiler);
|
||||||
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
PyModule_AddIntConstant(module, "__port_stub__", 1);
|
||||||
|
|||||||
@@ -353,6 +353,7 @@ bool run_main_script_body(const char* lpCmdLine, std::string* error)
|
|||||||
initChat();
|
initChat();
|
||||||
initTextTail();
|
initTextTail();
|
||||||
initnet();
|
initnet();
|
||||||
|
initMiniMap();
|
||||||
initeffect();
|
initeffect();
|
||||||
initfly();
|
initfly();
|
||||||
initServerStateChecker();
|
initServerStateChecker();
|
||||||
|
|||||||
@@ -343,3 +343,20 @@ bool CMapManager::IsMapReady()
|
|||||||
auto found = s_native_maps.find(this);
|
auto found = s_native_maps.find(this);
|
||||||
return found != s_native_maps.end() && found->second.ready;
|
return found != s_native_maps.end() && found->second.ready;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 40250 MapManager.cpp: true when the current map is a CMapOutdoor. PORT: CMapOutdoor is not ported (the Godot
|
||||||
|
// terrain adapter draws the map), so there is no outdoor map object to hand out; false keeps the 40250 callers
|
||||||
|
// (CPythonMiniMap::Update/Render/LoadAtlas) on their "no outdoor map" path instead of reaching into one.
|
||||||
|
auto CMapManager::IsMapOutdoor() -> bool
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto CMapManager::GetMapOutdoorRef() -> CMapOutdoor &
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
// Never constructed (CMapOutdoor's constructor is not ported either); unreachable while IsMapOutdoor() is false.
|
||||||
|
alignas(CMapOutdoor) static unsigned char storage[sizeof(CMapOutdoor)];
|
||||||
|
return *reinterpret_cast<CMapOutdoor *>(storage);
|
||||||
|
}
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
// Stand-in for the 40250 logic unit GameLib/MapOutdoor.cpp, not ported yet: the members the ported units
|
||||||
|
// reference, as platform_stub.py stubs. Only reached behind CMapManager::IsMapOutdoor(), which is false until
|
||||||
|
// CMapOutdoor is ported. Delete this file in the commit that ports the unit into port/ (docs/PORT-PLAN.md).
|
||||||
|
#include "GameLib/StdAfx.h"
|
||||||
|
#include "GameLib/MapOutdoor.h"
|
||||||
|
|
||||||
|
#include "../../PlatformStub.h"
|
||||||
|
|
||||||
|
auto CMapOutdoor::GetTerrainPointer(BYTE, CTerrain **) -> BOOL
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto CMapOutdoor::GetBaseXY(DWORD *, DWORD *) -> void
|
||||||
|
{
|
||||||
|
MT_PLATFORM_STUB();
|
||||||
|
}
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
// Stand-in for the 40250 logic unit UserInterface/PythonMiniMap.cpp, not ported yet: the members the ported units
|
|
||||||
// reference, as platform_stub.py stubs. Delete this file in the commit that ports the unit into port/
|
|
||||||
// (docs/PORT-PLAN.md).
|
|
||||||
#include "UserInterface/StdAfx.h"
|
|
||||||
#include "UserInterface/PythonMiniMap.h"
|
|
||||||
|
|
||||||
#include "../../PlatformStub.h"
|
|
||||||
|
|
||||||
CPythonMiniMap::CPythonMiniMap()
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
CPythonMiniMap::~CPythonMiniMap()
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::AddObserver(DWORD, float, float) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::MoveObserver(DWORD, float, float) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::RemoveObserver(DWORD) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::ClearAtlasMarkInfo() -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::RegisterAtlasMark(BYTE, const char *, long, long) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::ClearGuildArea() -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::RegisterGuildArea(DWORD, DWORD, long, long, long, long) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::CreateTarget(int, const char *) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::CreateTarget(int, const char *, DWORD) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::UpdateTarget(int, int, int) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::DeleteTarget(int) -> void
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto CPythonMiniMap::GetGuildAreaID(DWORD, DWORD) -> DWORD
|
|
||||||
{
|
|
||||||
MT_PLATFORM_STUB();
|
|
||||||
return mt_platform_stub_return<DWORD>();
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
// stdafx.cpp : source file that includes just the standard includes
|
||||||
|
// PRTerrainLib.pch will be the pre-compiled header
|
||||||
|
// stdafx.obj will contain the pre-compiled type information
|
||||||
|
|
||||||
|
#include "StdAfx.h"
|
||||||
|
|
||||||
|
/* Fast Float<->Integer conversion */
|
||||||
|
float PR_FCNV;
|
||||||
|
long PR_ICNV;
|
||||||
|
|
||||||
@@ -65,11 +65,17 @@ typedef struct
|
|||||||
|
|
||||||
/* Converts a floating point number to an integer by truncation, using
|
/* Converts a floating point number to an integer by truncation, using
|
||||||
the FISTP instruction */
|
the FISTP instruction */
|
||||||
|
#ifdef _MSC_VER
|
||||||
#define PR_FLOAT_TO_INTASM __asm \
|
#define PR_FLOAT_TO_INTASM __asm \
|
||||||
{ \
|
{ \
|
||||||
__asm fld PR_FCNV \
|
__asm fld PR_FCNV \
|
||||||
__asm fistp PR_ICNV \
|
__asm fistp PR_ICNV \
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// PORT: x87 fld/fistp stores PR_FCNV rounded in the current (default round-to-nearest-even) mode; lrintf is
|
||||||
|
// that conversion without inline x86 assembly.
|
||||||
|
#define PR_FLOAT_TO_INTASM (PR_ICNV = lrintf(PR_FCNV))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PR_FLOAT_TO_FIXED(inreal, outint) \
|
#define PR_FLOAT_TO_FIXED(inreal, outint) \
|
||||||
{ \
|
{ \
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,357 @@
|
|||||||
|
#include "StdAfx.h"
|
||||||
|
#include "PythonMiniMap.h"
|
||||||
|
|
||||||
|
PyObject * miniMapSetScale(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fScale;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fScale))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().SetScale(fScale);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapSetCenterPosition(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fCenterX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fCenterX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fCenterY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fCenterY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().SetCenterPosition(fCenterX, fCenterY);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject * miniMapSetMiniMapSize(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fWidth;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fWidth))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fHeight;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fHeight))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().SetMiniMapSize(fWidth, fHeight);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapDestroy(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().Destroy();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapCreate(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().Create();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapUpdate(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fCenterX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fCenterX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fCenterY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fCenterY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().Update(fCenterX, fCenterY);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapRender(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fScrrenX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fScrrenX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fScrrenY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fScrrenY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().Render(fScrrenX, fScrrenY);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapShow(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().Show();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapHide(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().Hide();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapisShow(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
bool bShow = CPythonMiniMap::Instance().CanShow();
|
||||||
|
return Py_BuildValue("b", bShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapScaleUp(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().ScaleUp();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapScaleDown(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().ScaleDown();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapGetInfo(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fScrrenX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fScrrenX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fScrrenY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fScrrenY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
std::string aString;
|
||||||
|
float fPosX, fPosY;
|
||||||
|
DWORD dwTextColor;
|
||||||
|
bool bFind = CPythonMiniMap::Instance().GetPickedInstanceInfo(fScrrenX, fScrrenY, aString, &fPosX, &fPosY, &dwTextColor);
|
||||||
|
int iPosX, iPosY;
|
||||||
|
PR_FLOAT_TO_INT(fPosX, iPosX);
|
||||||
|
PR_FLOAT_TO_INT(fPosY, iPosY);
|
||||||
|
iPosX /= 100;
|
||||||
|
iPosY /= 100;
|
||||||
|
return Py_BuildValue("isiil", (int)bFind, aString.c_str(), iPosX, iPosY, (signed) dwTextColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// Atlas
|
||||||
|
PyObject * miniMapLoadAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
if (!CPythonMiniMap::Instance().LoadAtlas())
|
||||||
|
TraceError("CPythonMiniMap::Instance().LoadAtlas() Failed");
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapUpdateAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().UpdateAtlas();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapRenderAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fScrrenX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fScrrenX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fScrrenY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fScrrenY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().RenderAtlas(fScrrenX, fScrrenY);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapShowAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().ShowAtlas();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapHideAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().HideAtlas();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapisShowAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
bool bShow = CPythonMiniMap::Instance().CanShowAtlas();
|
||||||
|
return Py_BuildValue("b", bShow);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapIsAtlas(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
bool isData = CPythonMiniMap::Instance().IsAtlas();
|
||||||
|
return Py_BuildValue("b", isData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PyObject * miniMapGetAtlasInfo(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fScrrenX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 0, &fScrrenX))
|
||||||
|
return Py_BuildException();
|
||||||
|
float fScrrenY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fScrrenY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
std::string aString = "";
|
||||||
|
float fPosX = 0.0f;
|
||||||
|
float fPosY = 0.0f;
|
||||||
|
DWORD dwTextColor = 0;
|
||||||
|
DWORD dwGuildID = 0;
|
||||||
|
bool bFind = CPythonMiniMap::Instance().GetAtlasInfo(fScrrenX, fScrrenY, aString, &fPosX, &fPosY, &dwTextColor, &dwGuildID);
|
||||||
|
int iPosX, iPosY;
|
||||||
|
PR_FLOAT_TO_INT(fPosX, iPosX);
|
||||||
|
PR_FLOAT_TO_INT(fPosY, iPosY);
|
||||||
|
iPosX /= 100;
|
||||||
|
iPosY /= 100;
|
||||||
|
return Py_BuildValue("isiili", (int)bFind, aString.c_str(), iPosX, iPosY, (signed) dwTextColor, dwGuildID);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapGetAtlasSize(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
float fSizeX, fSizeY;
|
||||||
|
bool bGet = CPythonMiniMap::Instance().GetAtlasSize(&fSizeX, &fSizeY);
|
||||||
|
|
||||||
|
/*
|
||||||
|
float fSizeXoo256 = fSizeX / 256.0f;
|
||||||
|
float fSizeYoo256 = fSizeY / 256.0f;
|
||||||
|
|
||||||
|
if (fSizeXoo256 >= fSizeYoo256)
|
||||||
|
{
|
||||||
|
fSizeX /= fSizeYoo256;
|
||||||
|
fSizeY = 256.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fSizeX = 256.0f;
|
||||||
|
fSizeY /= fSizeXoo256;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
int iSizeX, iSizeY;
|
||||||
|
PR_FLOAT_TO_INT(fSizeX, iSizeX);
|
||||||
|
PR_FLOAT_TO_INT(fSizeY, iSizeY);
|
||||||
|
|
||||||
|
return Py_BuildValue("bii", (int)bGet, iSizeX, iSizeY);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapAddWayPoint(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
int iID;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &iID))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fX;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 1, &fX))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
float fY;
|
||||||
|
if (!PyTuple_GetFloat(poArgs, 2, &fY))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
char * buf;
|
||||||
|
if (!PyTuple_GetString(poArgs, 3, &buf))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().AddWayPoint(CPythonMiniMap::TYPE_WAYPOINT, (DWORD)iID, fX, fY, buf);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject * miniMapRemoveWayPoint(PyObject * poSelf, PyObject * poArgs)
|
||||||
|
{
|
||||||
|
int iID;
|
||||||
|
if (!PyTuple_GetInteger(poArgs, 0, &iID))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
CPythonMiniMap::Instance().RemoveWayPoint((DWORD)iID);
|
||||||
|
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* miniMapRegisterAtlasWindow(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
PyObject * poHandler;
|
||||||
|
if (!PyTuple_GetObject(poArgs, 0, &poHandler))
|
||||||
|
return Py_BuildException();
|
||||||
|
CPythonMiniMap::Instance().RegisterAtlasWindow(poHandler);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* miniMapUnregisterAtlasWindow(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
CPythonMiniMap::Instance().UnregisterAtlasWindow();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* miniMapGetGuildAreaID(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();
|
||||||
|
|
||||||
|
DWORD dwGuildID = CPythonMiniMap::Instance().GetGuildAreaID(fx, fy);
|
||||||
|
return Py_BuildValue("i", dwGuildID);
|
||||||
|
}
|
||||||
|
|
||||||
|
void initMiniMap()
|
||||||
|
{
|
||||||
|
static PyMethodDef s_methods[] =
|
||||||
|
{
|
||||||
|
{ "SetScale", miniMapSetScale, METH_VARARGS },
|
||||||
|
{ "ScaleUp", miniMapScaleUp, METH_VARARGS },
|
||||||
|
{ "ScaleDown", miniMapScaleDown, METH_VARARGS },
|
||||||
|
{ "SetMiniMapSize", miniMapSetMiniMapSize, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "SetCenterPosition", miniMapSetCenterPosition, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "Destroy", miniMapDestroy, METH_VARARGS },
|
||||||
|
{ "Create", miniMapCreate, METH_VARARGS },
|
||||||
|
{ "Update", miniMapUpdate, METH_VARARGS },
|
||||||
|
{ "Render", miniMapRender, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "Show", miniMapShow, METH_VARARGS },
|
||||||
|
{ "Hide", miniMapHide, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "isShow", miniMapisShow, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "GetInfo", miniMapGetInfo, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "LoadAtlas", miniMapLoadAtlas, METH_VARARGS },
|
||||||
|
{ "UpdateAtlas", miniMapUpdateAtlas, METH_VARARGS },
|
||||||
|
{ "RenderAtlas", miniMapRenderAtlas, METH_VARARGS },
|
||||||
|
{ "ShowAtlas", miniMapShowAtlas, METH_VARARGS },
|
||||||
|
{ "HideAtlas", miniMapHideAtlas, METH_VARARGS },
|
||||||
|
{ "isShowAtlas", miniMapisShowAtlas, METH_VARARGS },
|
||||||
|
{ "IsAtlas", miniMapIsAtlas, METH_VARARGS },
|
||||||
|
{ "GetAtlasInfo", miniMapGetAtlasInfo, METH_VARARGS },
|
||||||
|
{ "GetAtlasSize", miniMapGetAtlasSize, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "AddWayPoint", miniMapAddWayPoint, METH_VARARGS },
|
||||||
|
{ "RemoveWayPoint", miniMapRemoveWayPoint, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "RegisterAtlasWindow", miniMapRegisterAtlasWindow, METH_VARARGS },
|
||||||
|
{ "UnregisterAtlasWindow", miniMapUnregisterAtlasWindow, METH_VARARGS },
|
||||||
|
|
||||||
|
{ "GetGuildAreaID", miniMapGetGuildAreaID, METH_VARARGS },
|
||||||
|
|
||||||
|
{ NULL, NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
PyObject * poModule = Py_InitModule("miniMap", s_methods);
|
||||||
|
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_OPC", CPythonMiniMap::TYPE_OPC);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_OPCPVP", CPythonMiniMap::TYPE_OPCPVP);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_OPCPVPSELF", CPythonMiniMap::TYPE_OPCPVPSELF);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_NPC", CPythonMiniMap::TYPE_NPC);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_MONSTER", CPythonMiniMap::TYPE_MONSTER);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_WARP", CPythonMiniMap::TYPE_WARP);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_WAYPOINT", CPythonMiniMap::TYPE_WAYPOINT);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_PARTY", CPythonMiniMap::TYPE_PARTY);
|
||||||
|
PyModule_AddIntConstant(poModule, "TYPE_EMPIRE", CPythonMiniMap::TYPE_EMPIRE);
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
#include "../GameLib/StdAfx.h" // 40250 PCH order: GameLib types precede UserInterface/GameType.h.
|
#include "../GameLib/StdAfx.h" // 40250 PCH order: GameLib types precede UserInterface/GameType.h.
|
||||||
#include "../GameLib/RaceData.h"
|
#include "../GameLib/RaceData.h"
|
||||||
#include "../EterPythonLib/StdAfx.h"
|
#include "../EterPythonLib/StdAfx.h"
|
||||||
|
#include "../PRTerrainLib/StdAfx.h" // 40250 PCH: PR_FCNV/PR_ICNV for PR_FLOAT_TO_INT.
|
||||||
#include "Locale.h" // Before GameType.h, as in 40250: Locale_inc.h's feature macros shape its tables.
|
#include "Locale.h" // Before GameType.h, as in 40250: Locale_inc.h's feature macros shape its tables.
|
||||||
#include "GameType.h" // 40250's UserInterface precompiled header supplies these item types.
|
#include "GameType.h" // 40250's UserInterface precompiled header supplies these item types.
|
||||||
#include "../EterBase/tea.h"
|
#include "../EterBase/tea.h"
|
||||||
@@ -51,6 +52,7 @@ void initItem();
|
|||||||
void initNonPlayer();
|
void initNonPlayer();
|
||||||
void initTrade();
|
void initTrade();
|
||||||
void initTextTail();
|
void initTextTail();
|
||||||
|
void initMiniMap();
|
||||||
void initChat();
|
void initChat();
|
||||||
void initnet();
|
void initnet();
|
||||||
void initeffect();
|
void initeffect();
|
||||||
|
|||||||
@@ -243,6 +243,14 @@ struct D3DXCOLOR
|
|||||||
|
|
||||||
FLOAT r, g, b, a;
|
FLOAT r, g, b, a;
|
||||||
};
|
};
|
||||||
|
inline D3DXCOLOR* D3DXColorModulate(D3DXCOLOR* pOut, const D3DXCOLOR* pC1, const D3DXCOLOR* pC2)
|
||||||
|
{
|
||||||
|
pOut->r = pC1->r * pC2->r;
|
||||||
|
pOut->g = pC1->g * pC2->g;
|
||||||
|
pOut->b = pC1->b * pC2->b;
|
||||||
|
pOut->a = pC1->a * pC2->a;
|
||||||
|
return pOut;
|
||||||
|
}
|
||||||
|
|
||||||
static_assert(sizeof(D3DXVECTOR2) == 8 && sizeof(D3DXVECTOR3) == 12 && sizeof(D3DXVECTOR4) == 16, "D3DX vector layout");
|
static_assert(sizeof(D3DXVECTOR2) == 8 && sizeof(D3DXVECTOR3) == 12 && sizeof(D3DXVECTOR4) == 16, "D3DX vector layout");
|
||||||
static_assert(sizeof(D3DXMATRIX) == 64 && sizeof(D3DXQUATERNION) == 16 && sizeof(D3DXCOLOR) == 16, "D3DX layout");
|
static_assert(sizeof(D3DXMATRIX) == 64 && sizeof(D3DXQUATERNION) == 16 && sizeof(D3DXCOLOR) == 16, "D3DX layout");
|
||||||
|
|||||||
@@ -501,6 +501,14 @@ int main(int argc, char** argv)
|
|||||||
"assert item.GetItemType() == item.ITEM_TYPE_WEAPON and item.GetItemSubType() == item.WEAPON_SWORD\n"
|
"assert item.GetItemType() == item.ITEM_TYPE_WEAPON and item.GetItemSubType() == item.WEAPON_SWORD\n"
|
||||||
"assert item.GetValue(3) > 0, 'min attack'"));
|
"assert item.GetValue(3) > 0, 'min attack'"));
|
||||||
|
|
||||||
|
// miniMap module (PythonMiniMapModule.cpp): uiminimap.MiniMap created and showed it. CMapOutdoor is not
|
||||||
|
// ported, so CMapManager::IsMapOutdoor() is false and the atlas reports "not loaded" as 40250 does off an
|
||||||
|
// outdoor map.
|
||||||
|
CHECK(py("import miniMap\n"
|
||||||
|
"assert miniMap.isShow()\n"
|
||||||
|
"(bGet, x, y) = miniMap.GetAtlasSize()\n"
|
||||||
|
"assert not bGet, (bGet, x, y)"));
|
||||||
|
|
||||||
// Ground items (CPythonItem): the fake server put vnum 19 next to the actor at entergame (GC_ITEM_GROUND_ADD
|
// Ground items (CPythonItem): the fake server put vnum 19 next to the actor at entergame (GC_ITEM_GROUND_ADD
|
||||||
// + GC_ITEM_OWNERSHIP). player.PickCloseItem finds it within __GetPickableDistance, sends CG_ITEM_PICKUP,
|
// + GC_ITEM_OWNERSHIP). player.PickCloseItem finds it within __GetPickableDistance, sends CG_ITEM_PICKUP,
|
||||||
// and the server's GC_ITEM_GROUND_DEL removes it.
|
// and the server's GC_ITEM_GROUND_DEL removes it.
|
||||||
|
|||||||
Reference in New Issue
Block a user