Include and exclude asset type dumping configured by command line args

This commit is contained in:
Jan
2021-10-11 18:47:53 +02:00
parent e70cbaa4ce
commit 868bd070d0
21 changed files with 476 additions and 576 deletions

View File

@ -1,5 +1,6 @@
#include "ZoneDumperIW3.h"
#include "ObjWriting.h"
#include "Game/IW3/GameIW3.h"
#include "Game/IW3/GameAssetPoolIW3.h"
@ -21,8 +22,8 @@ bool ZoneDumper::CanHandleZone(AssetDumpingContext& context) const
bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
{
#define DUMP_ASSET_POOL(dumperType, poolName) \
if(assetPools->poolName) \
#define DUMP_ASSET_POOL(dumperType, poolName, assetType) \
if(assetPools->poolName && ObjWriting::ShouldHandleAssetType(assetType)) \
{ \
dumperType dumper; \
dumper.DumpPool(context, assetPools->poolName.get()); \
@ -30,32 +31,32 @@ bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
const auto* assetPools = dynamic_cast<GameAssetPoolIW3*>(context.m_zone->m_pools.get());
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp)
DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list)
// DUMP_ASSET_POOL(AssetDumpermenuDef_t, m_menu_def)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize)
// DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table)
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel, ASSET_TYPE_XMODEL)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material, ASSET_TYPE_MATERIAL)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image, ASSET_TYPE_IMAGE)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve, ASSET_TYPE_SOUND_CURVE)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound, ASSET_TYPE_LOADED_SOUND)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map, ASSET_TYPE_CLIPMAP)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP)
DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST)
// DUMP_ASSET_POOL(AssetDumpermenuDef_t, m_menu_def, ASSET_TYPE_MENU)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize, ASSET_TYPE_LOCALIZE_ENTRY)
// DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file, ASSET_TYPE_RAWFILE)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table, ASSET_TYPE_STRINGTABLE)
return true;

View File

@ -1,5 +1,6 @@
#include "ZoneDumperIW4.h"
#include "ObjWriting.h"
#include "Game/IW4/GameIW4.h"
#include "Game/IW4/GameAssetPoolIW4.h"
@ -24,8 +25,8 @@ bool ZoneDumper::CanHandleZone(AssetDumpingContext& context) const
bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
{
#define DUMP_ASSET_POOL(dumperType, poolName) \
if(assetPools->poolName) \
#define DUMP_ASSET_POOL(dumperType, poolName, assetType) \
if(assetPools->poolName && ObjWriting::ShouldHandleAssetType(assetType)) \
{ \
dumperType dumper; \
dumper.DumpPool(context, assetPools->poolName.get()); \
@ -33,42 +34,42 @@ bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
const auto* assetPools = dynamic_cast<GameAssetPoolIW4*>(context.m_zone->m_pools.get());
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset)
// DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material)
// DUMP_ASSET_POOL(AssetDumperMaterialPixelShader, m_material_pixel_shader)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexShader, m_material_vertex_shader)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexDeclaration, m_material_vertex_decl)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents)
// DUMP_ASSET_POOL(AssetDumperFxWorld, m_fx_world)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font)
DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list)
DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize)
DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table)
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard)
// DUMP_ASSET_POOL(AssetDumperStructuredDataDefSet, m_structed_data_def_set)
// DUMP_ASSET_POOL(AssetDumperTracerDef, m_tracer)
DUMP_ASSET_POOL(AssetDumperVehicle, m_vehicle)
DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents)
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET)
// DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap, ASSET_TYPE_PHYSCOLLMAP)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel, ASSET_TYPE_XMODEL)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material, ASSET_TYPE_MATERIAL)
// DUMP_ASSET_POOL(AssetDumperMaterialPixelShader, m_material_pixel_shader, ASSET_TYPE_PIXELSHADER)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexShader, m_material_vertex_shader, ASSET_TYPE_VERTEXSHADER)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexDeclaration, m_material_vertex_decl, ASSET_TYPE_VERTEXDECL)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image, ASSET_TYPE_IMAGE)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve, ASSET_TYPE_SOUND_CURVE)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound, ASSET_TYPE_LOADED_SOUND)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map, ASSET_TYPE_CLIPMAP_MP)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS)
// DUMP_ASSET_POOL(AssetDumperFxWorld, m_fx_world, ASSET_TYPE_FXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT)
DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST)
DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def, ASSET_TYPE_MENU)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize, ASSET_TYPE_LOCALIZE_ENTRY)
DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file, ASSET_TYPE_RAWFILE)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table, ASSET_TYPE_STRINGTABLE)
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard, ASSET_TYPE_LEADERBOARD)
// DUMP_ASSET_POOL(AssetDumperStructuredDataDefSet, m_structed_data_def_set, ASSET_TYPE_STRUCTURED_DATA_DEF)
// DUMP_ASSET_POOL(AssetDumperTracerDef, m_tracer, ASSET_TYPE_TRACER)
DUMP_ASSET_POOL(AssetDumperVehicle, m_vehicle, ASSET_TYPE_VEHICLE)
DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS)
return true;

View File

@ -1,5 +1,6 @@
#include "ZoneDumperIW5.h"
#include "ObjWriting.h"
#include "Game/IW5/GameIW5.h"
#include "Game/IW5/GameAssetPoolIW5.h"
@ -20,54 +21,54 @@ bool ZoneDumper::CanHandleZone(AssetDumpingContext& context) const
bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
{
#define DUMP_ASSET_POOL(dumperType, poolName) \
if(assetPools->poolName) \
#define DUMP_ASSET_POOL(dumperType, poolName, assetType) \
if(assetPools->poolName && ObjWriting::ShouldHandleAssetType(assetType)) \
{ \
dumperType dumper; \
dumper.DumpPool(context, assetPools->poolName.get()); \
}
const auto* assetPools = dynamic_cast<GameAssetPoolIW5*>(context.m_zone->m_pools.get());
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset)
// DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts)
// DUMP_ASSET_POOL(AssetDumperXModelSurfs, m_xmodel_surfs)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material)
// DUMP_ASSET_POOL(AssetDumperMaterialPixelShader, m_material_pixel_shader)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexShader, m_material_vertex_shader)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexDeclaration, m_material_vertex_decl)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world)
// DUMP_ASSET_POOL(AssetDumperGlassWorld, m_glass_world)
// DUMP_ASSET_POOL(AssetDumperPathData, m_path_data)
// DUMP_ASSET_POOL(AssetDumperVehicleTrack, m_vehicle_track)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents)
// DUMP_ASSET_POOL(AssetDumperFxWorld, m_fx_world)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list)
// DUMP_ASSET_POOL(AssetDumpermenuDef_t, m_menu_def)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize)
// DUMP_ASSET_POOL(AssetDumperWeaponAttachment, m_attachment)
// DUMP_ASSET_POOL(AssetDumperWeaponCompleteDef, m_weapon)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table)
// DUMP_ASSET_POOL(AssetDumperSurfaceFxTable, m_surface_fx_table)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file)
// DUMP_ASSET_POOL(AssetDumperScriptFile, m_script_file)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table)
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard)
// DUMP_ASSET_POOL(AssetDumperStructuredDataDefSet, m_structed_data_def_set)
// DUMP_ASSET_POOL(AssetDumperTracerDef, m_tracer)
// DUMP_ASSET_POOL(AssetDumperVehicleDef, m_vehicle)
DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents)
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET)
// DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap, ASSET_TYPE_PHYSCOLLMAP)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS)
// DUMP_ASSET_POOL(AssetDumperXModelSurfs, m_xmodel_surfs, ASSET_TYPE_XMODEL_SURFS)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel, ASSET_TYPE_XMODEL)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material, ASSET_TYPE_MATERIAL)
// DUMP_ASSET_POOL(AssetDumperMaterialPixelShader, m_material_pixel_shader, ASSET_TYPE_PIXELSHADER)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexShader, m_material_vertex_shader, ASSET_TYPE_VERTEXSHADER)
// DUMP_ASSET_POOL(AssetDumperMaterialVertexDeclaration, m_material_vertex_decl, ASSET_TYPE_VERTEXDECL)
// DUMP_ASSET_POOL(AssetDumperMaterialTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image, ASSET_TYPE_IMAGE)
// DUMP_ASSET_POOL(AssetDumpersnd_alias_list_t, m_sound, ASSET_TYPE_SOUND)
// DUMP_ASSET_POOL(AssetDumperSndCurve, m_sound_curve, ASSET_TYPE_SOUND_CURVE)
DUMP_ASSET_POOL(AssetDumperLoadedSound, m_loaded_sound, ASSET_TYPE_LOADED_SOUND)
// DUMP_ASSET_POOL(AssetDumperclipMap_t, m_clip_map, ASSET_TYPE_CLIPMAP)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD)
// DUMP_ASSET_POOL(AssetDumperGlassWorld, m_glass_world, ASSET_TYPE_GLASSWORLD)
// DUMP_ASSET_POOL(AssetDumperPathData, m_path_data, ASSET_TYPE_PATHDATA)
// DUMP_ASSET_POOL(AssetDumperVehicleTrack, m_vehicle_track, ASSET_TYPE_VEHICLE_TRACK)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS)
// DUMP_ASSET_POOL(AssetDumperFxWorld, m_fx_world, ASSET_TYPE_FXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF)
// DUMP_ASSET_POOL(AssetDumperFont_s, m_font, ASSET_TYPE_FONT)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST)
// DUMP_ASSET_POOL(AssetDumpermenuDef_t, m_menu_def, ASSET_TYPE_MENU)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize, ASSET_TYPE_LOCALIZE_ENTRY)
// DUMP_ASSET_POOL(AssetDumperWeaponAttachment, m_attachment, ASSET_TYPE_ATTACHMENT)
// DUMP_ASSET_POOL(AssetDumperWeaponCompleteDef, m_weapon, ASSET_TYPE_WEAPON)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX)
// DUMP_ASSET_POOL(AssetDumperSurfaceFxTable, m_surface_fx_table, ASSET_TYPE_SURFACE_FX)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file, ASSET_TYPE_RAWFILE)
// DUMP_ASSET_POOL(AssetDumperScriptFile, m_script_file, ASSET_TYPE_SCRIPTFILE)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table, ASSET_TYPE_STRINGTABLE)
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard, ASSET_TYPE_LEADERBOARD)
// DUMP_ASSET_POOL(AssetDumperStructuredDataDefSet, m_structed_data_def_set, ASSET_TYPE_STRUCTURED_DATA_DEF)
// DUMP_ASSET_POOL(AssetDumperTracerDef, m_tracer, ASSET_TYPE_TRACER)
// DUMP_ASSET_POOL(AssetDumperVehicleDef, m_vehicle, ASSET_TYPE_VEHICLE)
DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS)
return true;

View File

@ -1,5 +1,6 @@
#include "ZoneDumperT5.h"
#include "ObjWriting.h"
#include "Game/T5/GameT5.h"
#include "Game/T5/GameAssetPoolT5.h"
@ -22,47 +23,47 @@ bool ZoneDumper::CanHandleZone(AssetDumpingContext& context) const
bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
{
#define DUMP_ASSET_POOL(dumperType, poolName) \
if(assetPools->poolName) \
#define DUMP_ASSET_POOL(dumperType, poolName, assetType) \
if(assetPools->poolName && ObjWriting::ShouldHandleAssetType(assetType)) \
{ \
dumperType dumper; \
dumper.DumpPool(context, assetPools->poolName); \
dumper.DumpPool(context, assetPools->poolName.get()); \
}
const auto* assetPools = dynamic_cast<GameAssetPoolT5*>(context.m_zone->m_pools.get());
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset)
// DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints)
// DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material)
// DUMP_ASSET_POOL(AssetDumperTechniqueSet, m_technique_set)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image)
// DUMP_ASSET_POOL(AssetDumperSndBank, m_sound_bank)
// DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch)
// DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def)
// DUMP_ASSET_POOL(AssetDumperFont, m_font)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list)
// DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize)
// DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table)
// DUMP_ASSET_POOL(AssetDumperPackIndex, m_pack_index)
// DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals)
// DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl)
// DUMP_ASSET_POOL(AssetDumperGlasses, m_glasses)
// DUMP_ASSET_POOL(AssetDumperEmblemSet, m_emblem_set)
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET)
// DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints, ASSET_TYPE_PHYSCONSTRAINTS)
// DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def, ASSET_TYPE_DESTRUCTIBLEDEF)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel, ASSET_TYPE_XMODEL)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material, ASSET_TYPE_MATERIAL)
// DUMP_ASSET_POOL(AssetDumperTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image, ASSET_TYPE_IMAGE)
// DUMP_ASSET_POOL(AssetDumperSndBank, m_sound_bank, ASSET_TYPE_SOUND)
// DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch, ASSET_TYPE_SOUND_PATCH)
// DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF)
// DUMP_ASSET_POOL(AssetDumperFont, m_font, ASSET_TYPE_FONT)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST)
// DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def, ASSET_TYPE_MENU)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize, ASSET_TYPE_LOCALIZE_ENTRY)
// DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file, ASSET_TYPE_RAWFILE)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table, ASSET_TYPE_STRINGTABLE)
// DUMP_ASSET_POOL(AssetDumperPackIndex, m_pack_index, ASSET_TYPE_PACK_INDEX)
// DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals, ASSET_TYPE_XGLOBALS)
// DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl, ASSET_TYPE_DDL)
// DUMP_ASSET_POOL(AssetDumperGlasses, m_glasses, ASSET_TYPE_GLASSES)
// DUMP_ASSET_POOL(AssetDumperEmblemSet, m_emblem_set, ASSET_TYPE_EMBLEMSET)
return true;

View File

@ -1,5 +1,6 @@
#include "ZoneDumperT6.h"
#include "ObjWriting.h"
#include "Game/T6/GameT6.h"
#include "Game/T6/GameAssetPoolT6.h"
@ -31,63 +32,63 @@ bool ZoneDumper::CanHandleZone(AssetDumpingContext& context) const
bool ZoneDumper::DumpZone(AssetDumpingContext& context) const
{
#define DUMP_ASSET_POOL(dumperType, poolName) \
if(assetPools->poolName) \
#define DUMP_ASSET_POOL(dumperType, poolName, assetType) \
if(assetPools->poolName && ObjWriting::ShouldHandleAssetType(assetType)) \
{ \
dumperType dumper; \
dumper.DumpPool(context, assetPools->poolName); \
dumper.DumpPool(context, assetPools->poolName.get()); \
}
const auto* assetPools = dynamic_cast<GameAssetPoolT6*>(context.m_zone->m_pools.get());
DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset);
DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints);
// DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def);
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts);
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel);
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material);
// DUMP_ASSET_POOL(AssetDumperTechniqueSet, m_technique_set);
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image);
DUMP_ASSET_POOL(AssetDumperSndBank, m_sound_bank);
// DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch);
// DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map);
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world);
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp);
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp);
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents);
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world);
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def);
// DUMP_ASSET_POOL(AssetDumperFont, m_font);
DUMP_ASSET_POOL(AssetDumperFontIcon, m_font_icon);
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list);
// DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def);
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize);
DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon);
DUMP_ASSET_POOL(AssetDumperWeaponAttachment, m_attachment);
DUMP_ASSET_POOL(AssetDumperWeaponAttachmentUnique, m_attachment_unique);
// DUMP_ASSET_POOL(AssetDumperWeaponCamo, m_camo);
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals);
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx);
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table);
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file);
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table);
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard);
// DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals);
// DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl);
// DUMP_ASSET_POOL(AssetDumperGlasses, m_glasses);
// DUMP_ASSET_POOL(AssetDumperEmblemSet, m_emblem_set);
DUMP_ASSET_POOL(AssetDumperScriptParseTree, m_script);
// DUMP_ASSET_POOL(AssetDumperKeyValuePairs, m_key_value_pairs);
DUMP_ASSET_POOL(AssetDumperVehicle, m_vehicle);
// DUMP_ASSET_POOL(AssetDumperMemoryBlock, m_memory_block);
// DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents);
DUMP_ASSET_POOL(AssetDumperTracer, m_tracer);
// DUMP_ASSET_POOL(AssetDumperSkinnedVertsDef, m_skinned_verts);
DUMP_ASSET_POOL(AssetDumperQdb, m_qdb);
DUMP_ASSET_POOL(AssetDumperSlug, m_slug);
// DUMP_ASSET_POOL(AssetDumperFootstepTableDef, m_footstep_table);
// DUMP_ASSET_POOL(AssetDumperFootstepFXTableDef, m_footstep_fx_table);
DUMP_ASSET_POOL(AssetDumperZBarrier, m_zbarrier);
DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset, ASSET_TYPE_PHYSPRESET)
DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints, ASSET_TYPE_PHYSCONSTRAINTS)
// DUMP_ASSET_POOL(AssetDumperDestructibleDef, m_destructible_def, ASSET_TYPE_DESTRUCTIBLEDEF)
// DUMP_ASSET_POOL(AssetDumperXAnimParts, m_xanim_parts, ASSET_TYPE_XANIMPARTS)
DUMP_ASSET_POOL(AssetDumperXModel, m_xmodel, ASSET_TYPE_XMODEL)
// DUMP_ASSET_POOL(AssetDumperMaterial, m_material, ASSET_TYPE_MATERIAL)
// DUMP_ASSET_POOL(AssetDumperTechniqueSet, m_technique_set, ASSET_TYPE_TECHNIQUE_SET)
DUMP_ASSET_POOL(AssetDumperGfxImage, m_image, ASSET_TYPE_IMAGE)
DUMP_ASSET_POOL(AssetDumperSndBank, m_sound_bank, ASSET_TYPE_SOUND)
// DUMP_ASSET_POOL(AssetDumperSndPatch, m_sound_patch, ASSET_TYPE_SOUND_PATCH)
// DUMP_ASSET_POOL(AssetDumperClipMap, m_clip_map, ASSET_TYPE_CLIPMAP)
// DUMP_ASSET_POOL(AssetDumperComWorld, m_com_world, ASSET_TYPE_COMWORLD)
// DUMP_ASSET_POOL(AssetDumperGameWorldSp, m_game_world_sp, ASSET_TYPE_GAMEWORLD_SP)
// DUMP_ASSET_POOL(AssetDumperGameWorldMp, m_game_world_mp, ASSET_TYPE_GAMEWORLD_MP)
// DUMP_ASSET_POOL(AssetDumperMapEnts, m_map_ents, ASSET_TYPE_MAP_ENTS)
// DUMP_ASSET_POOL(AssetDumperGfxWorld, m_gfx_world, ASSET_TYPE_GFXWORLD)
// DUMP_ASSET_POOL(AssetDumperGfxLightDef, m_gfx_light_def, ASSET_TYPE_LIGHT_DEF)
// DUMP_ASSET_POOL(AssetDumperFont, m_font, ASSET_TYPE_FONT)
DUMP_ASSET_POOL(AssetDumperFontIcon, m_font_icon, ASSET_TYPE_FONTICON)
// DUMP_ASSET_POOL(AssetDumperMenuList, m_menu_list, ASSET_TYPE_MENULIST)
// DUMP_ASSET_POOL(AssetDumperMenuDef, m_menu_def, ASSET_TYPE_MENU)
DUMP_ASSET_POOL(AssetDumperLocalizeEntry, m_localize, ASSET_TYPE_LOCALIZE_ENTRY)
DUMP_ASSET_POOL(AssetDumperWeapon, m_weapon, ASSET_TYPE_WEAPON)
DUMP_ASSET_POOL(AssetDumperWeaponAttachment, m_attachment, ASSET_TYPE_ATTACHMENT)
DUMP_ASSET_POOL(AssetDumperWeaponAttachmentUnique, m_attachment_unique, ASSET_TYPE_ATTACHMENT_UNIQUE)
// DUMP_ASSET_POOL(AssetDumperWeaponCamo, m_camo, ASSET_TYPE_WEAPON_CAMO)
// DUMP_ASSET_POOL(AssetDumperSndDriverGlobals, m_snd_driver_globals, ASSET_TYPE_SNDDRIVER_GLOBALS)
// DUMP_ASSET_POOL(AssetDumperFxEffectDef, m_fx, ASSET_TYPE_FX)
// DUMP_ASSET_POOL(AssetDumperFxImpactTable, m_fx_impact_table, ASSET_TYPE_IMPACT_FX)
DUMP_ASSET_POOL(AssetDumperRawFile, m_raw_file, ASSET_TYPE_RAWFILE)
DUMP_ASSET_POOL(AssetDumperStringTable, m_string_table, ASSET_TYPE_STRINGTABLE)
// DUMP_ASSET_POOL(AssetDumperLeaderboardDef, m_leaderboard, ASSET_TYPE_LEADERBOARD)
// DUMP_ASSET_POOL(AssetDumperXGlobals, m_xglobals, ASSET_TYPE_XGLOBALS)
// DUMP_ASSET_POOL(AssetDumperDDLRoot, m_ddl, ASSET_TYPE_DDL)
// DUMP_ASSET_POOL(AssetDumperGlasses, m_glasses, ASSET_TYPE_GLASSES)
// DUMP_ASSET_POOL(AssetDumperEmblemSet, m_emblem_set, ASSET_TYPE_EMBLEMSET)
DUMP_ASSET_POOL(AssetDumperScriptParseTree, m_script, ASSET_TYPE_SCRIPTPARSETREE)
// DUMP_ASSET_POOL(AssetDumperKeyValuePairs, m_key_value_pairs, ASSET_TYPE_KEYVALUEPAIRS)
DUMP_ASSET_POOL(AssetDumperVehicle, m_vehicle, ASSET_TYPE_VEHICLEDEF)
// DUMP_ASSET_POOL(AssetDumperMemoryBlock, m_memory_block, ASSET_TYPE_MEMORYBLOCK)
// DUMP_ASSET_POOL(AssetDumperAddonMapEnts, m_addon_map_ents, ASSET_TYPE_ADDON_MAP_ENTS)
DUMP_ASSET_POOL(AssetDumperTracer, m_tracer, ASSET_TYPE_TRACER)
// DUMP_ASSET_POOL(AssetDumperSkinnedVertsDef, m_skinned_verts, ASSET_TYPE_SKINNEDVERTS)
DUMP_ASSET_POOL(AssetDumperQdb, m_qdb, ASSET_TYPE_QDB)
DUMP_ASSET_POOL(AssetDumperSlug, m_slug, ASSET_TYPE_SLUG)
// DUMP_ASSET_POOL(AssetDumperFootstepTableDef, m_footstep_table, ASSET_TYPE_FOOTSTEP_TABLE)
// DUMP_ASSET_POOL(AssetDumperFootstepFXTableDef, m_footstep_fx_table, ASSET_TYPE_FOOTSTEPFX_TABLE)
DUMP_ASSET_POOL(AssetDumperZBarrier, m_zbarrier, ASSET_TYPE_ZBARRIER)
return true;