AVA2 client Windows parity passes (gr2 BitKnit2/64-bit, GamePhase handlers, python modules)
- gr2: BitKnit2 decompression, 64-bit LE files, compressed curves - net: remaining GamePhase handlers, generated GC packet table - python: event/chat/chr/minimap/guild/quest/messenger/shop-search and other native modules ported against the AVA2 Windows client - render: D3D8 fixed-function lighting in Gr2ModelRenderer, terrain without baked shade; cape/NPC equipment attachment - tests + audits updated; docs/PORT-PLAN.md and WINDOWS-PARITY.md Batch 4 (render pipeline: background.*, app.RenderGame/UpdateGame, camera bindings, main.cpp fake-content removal) is still in progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9f748eb05a
commit
9077aa389a
@@ -18,8 +18,17 @@ bool PyTuple_GetPointer(PyObject* args, int position, T** out)
|
||||
PyObject* value = PyTuple_GetItem(args, position);
|
||||
if (!value)
|
||||
return false;
|
||||
// A ScriptLib call may leave an error set while returning None (Py_BuildException with a
|
||||
// message, e.g. a missing image). AVA2 ScriptLib PyTuple_GetInteger ignores that stale error, so
|
||||
// only judge this conversion and leave the earlier error as it was.
|
||||
PyObject *type, *error, *traceback;
|
||||
PyErr_Fetch(&type, &error, &traceback);
|
||||
void* pointer = PyLong_AsVoidPtr(value);
|
||||
if (PyErr_Occurred())
|
||||
const bool failed = PyErr_Occurred() != nullptr;
|
||||
if (failed)
|
||||
PyErr_Clear();
|
||||
PyErr_Restore(type, error, traceback);
|
||||
if (failed)
|
||||
return false;
|
||||
*out = static_cast<T*>(pointer);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user