WoWs Model Exported
World of Warships 3D model Exporter
Loading...
Searching...
No Matches
wows-assets-bin.h
Go to the documentation of this file.
1
16#pragma once
17#include <stddef.h>
18#include <stdint.h>
19
20#ifdef __cplusplus
21extern bool wows_assets_bin_verbose;
22extern "C" {
23#endif
24
34typedef struct {
35 char name[256];
36 float mat[16];
38
46
58typedef struct {
59 char model_path[512];
60 float correction[16];
62
70
83typedef struct wows_assets_bin_pdb_s wows_assets_bin_pdb_t;
84
92
101
108
113
118 const char **model_paths, size_t n_paths);
119
134typedef struct {
135 unsigned int indices_mapping_id;
136 char mfm_path[512];
137 char section_name[256];
138 char node_name[256];
141
145typedef struct {
146 unsigned int *mapping_ids;
147 size_t count;
149
162
174
181
195typedef struct {
196 float mat[16];
197 char geom_path[512];
198 char name[64];
200
208
222 const char *hull_model_path,
223 const char **hull_geom_paths, size_t n_geom_paths);
224
231
247wows_assets_bin_hp_list_t *wows_assets_bin_get_hp_transforms(const char *path, const char *visual_suffix);
248
255
265 size_t n_paths);
266
273
276#ifdef __cplusplus
277}
278#endif
void wows_assets_bin_hp_list_free(wows_assets_bin_hp_list_t *list)
Free memory allocated by wows_assets_bin_get_hp_transforms.
void wows_assets_bin_bb_list_free(wows_assets_bin_bb_list_t *list)
Free memory allocated by wows_assets_bin_get_blendbone_corrections.
wows_assets_bin_hp_list_t * wows_assets_bin_get_hp_transforms(const char *path, const char *visual_suffix)
Extract hardpoint transforms for a visual, opening the PDB internally.
wows_assets_bin_bb_list_t * wows_assets_bin_get_blendbone_corrections(const char *path, const char **model_paths, size_t n_paths)
Extract BlendBone correction matrices for a set of model paths.
void wows_assets_bin_pdb_free(wows_assets_bin_pdb_t *pdb)
Close an assets.bin handle and release all associated memory.
wows_assets_bin_pdb_t * wows_assets_bin_pdb_open_memory(const uint8_t *data, size_t size)
Open and parse assets.bin from a memory buffer (contents are copied).
wows_assets_bin_bb_list_t * wows_assets_bin_get_blendbone_corrections_pdb(wows_assets_bin_pdb_t *pdb, const char **model_paths, size_t n_paths)
Like wows_assets_bin_get_blendbone_corrections but uses an already-open PDB handle.
wows_assets_bin_pdb_t * wows_assets_bin_pdb_open(const char *path)
Open and parse an assets.bin file.
wows_assets_bin_hp_list_t * wows_assets_bin_get_hp_transforms_pdb(wows_assets_bin_pdb_t *pdb, const char *visual_suffix)
Like wows_assets_bin_get_hp_transforms but uses an already-open PDB handle.
struct wows_assets_bin_pdb_s wows_assets_bin_pdb_t
Opaque handle to an open assets.bin database.
Definition wows-assets-bin.h:83
void wows_assets_bin_propeller_list_free(wows_assets_bin_propeller_list_t *list)
Free memory allocated by wows_assets_bin_get_propellers_pdb.
wows_assets_bin_propeller_list_t * wows_assets_bin_get_propellers_pdb(wows_assets_bin_pdb_t *pdb, const char *hull_model_path, const char **hull_geom_paths, size_t n_geom_paths)
Query propeller geometry and shaft positions from an open PDB handle.
wows_assets_bin_visual_info_t * wows_assets_bin_get_visual_info(wows_assets_bin_pdb_t *pdb, const char *visual_suffix)
Query render-set and LOD information for a .visual resource.
void wows_assets_bin_visual_info_free(wows_assets_bin_visual_info_t *info)
Free memory allocated by wows_assets_bin_get_visual_info.
List of BlendBone corrections for a set of model paths.
Definition wows-assets-bin.h:66
size_t count
Definition wows-assets-bin.h:68
wows_assets_bin_bb_t * entries
Definition wows-assets-bin.h:67
A single BlendBone correction entry.
Definition wows-assets-bin.h:58
List of all hardpoint transforms for one visual.
Definition wows-assets-bin.h:42
wows_assets_bin_hp_t * entries
Definition wows-assets-bin.h:43
size_t count
Definition wows-assets-bin.h:44
A single hardpoint transform entry.
Definition wows-assets-bin.h:34
List of draw-call IDs belonging to one LOD level.
Definition wows-assets-bin.h:145
unsigned int * mapping_ids
Definition wows-assets-bin.h:146
size_t count
Definition wows-assets-bin.h:147
List of propeller placements for a ship.
Definition wows-assets-bin.h:204
size_t count
Definition wows-assets-bin.h:206
wows_assets_bin_propeller_t * entries
Definition wows-assets-bin.h:205
One propeller placement entry.
Definition wows-assets-bin.h:195
One render-set entry within a visual.
Definition wows-assets-bin.h:134
unsigned int indices_mapping_id
Definition wows-assets-bin.h:135
int is_damage
Definition wows-assets-bin.h:139
Complete render-set and LOD description for a visual resource.
Definition wows-assets-bin.h:156
size_t lod_count
Definition wows-assets-bin.h:160
wows_assets_bin_lod_t * lods
Definition wows-assets-bin.h:159
wows_assets_bin_rs_t * render_sets
Definition wows-assets-bin.h:157
size_t rs_count
Definition wows-assets-bin.h:158