AVA2 Windows parity passes 26-29: background, grp/net/player/app complete port, 0 placeholders, portable assets

This commit is contained in:
shen
2026-10-07 21:18:47 -07:00
parent 9077aa389a
commit d9a2ff3fca
19 changed files with 5457 additions and 3657 deletions
+13 -3
View File
@@ -25,9 +25,12 @@ void tga(const std::filesystem::path& p) {Bytes b(18,0);b[2]=2;b[12]=64;b[14]=96
int main(int argc,char** argv) {
if(argc!=3)return 2;
auto root=std::filesystem::temp_directory_path()/std::filesystem::path("ava2-item-data-"+std::to_string(getpid()));std::filesystem::create_directories(root);
auto orig_cwd = std::filesystem::current_path();
auto zip_path = std::filesystem::absolute(argv[1]);
std::filesystem::current_path(root);
try {
{
PythonRuntime python(argv[1],root);python.execute("import item\n");
PythonRuntime python(zip_path, root);python.execute("import item\n");
python.execute(R"PY(for f in (item.GetItemName,item.GetItemDescription,item.GetItemSummary,item.GetItemSize,item.GetItemType,item.GetItemSubType,item.GetIconImage,item.GetIconImageFileName):
try: f()
except RuntimeError: pass
@@ -52,6 +55,13 @@ assert item.SelectItemWiki(27003)==0
textfile(root/"list","500\tignored\ticon/list2.tga\tmodel/new.gr2\n");require(LoadItemList("list"),"reload list failed");require(GetWeaponModelPathByVnum(500)=="model/new.gr2","explicit model path ignored");python.execute("assert item.GetItemType()==2 and item.GetItemName()=='Listed' and item.GetSocket(0)==0 and item.GetItemDescription()==''\n");
ResetItemDatabase();require(!GetItemTypeAndSubType(500,&type,&sub),"database reset retained records");python.execute("assert item.SelectItemWiki(500)==0\n");
}
std::filesystem::remove_all(root);std::cout<<"AVA2 item resource loading and selected data parity passed\n";
}catch(const std::exception& e){std::filesystem::remove_all(root);std::cerr<<e.what()<<'\n';return 1;}
std::filesystem::current_path(orig_cwd);
std::filesystem::remove_all(root);
std::cout<<"AVA2 item resource loading and selected data parity passed\n";
}catch(const std::exception& e){
std::filesystem::current_path(orig_cwd);
std::filesystem::remove_all(root);
std::cerr<<e.what()<<'\n';
return 1;
}
}