projects
/
csRadar.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tga & normals
[csRadar.git]
/
vmf.h
diff --git
a/vmf.h
b/vmf.h
index c5f736b4474977214d8ef543dbb79ba1029c4a0d..4fbe023c568867a5ba5cb6ab0a4ae90c581dbe99 100644
(file)
--- a/
vmf.h
+++ b/
vmf.h
@@
-43,7
+43,7
@@
void vmf_load_models( vmf_map *map );
// Create matrix describing this entities transform
void vmf_entity_transform( vdf_node *ent, m4x3f mat );
// Create matrix describing this entities transform
void vmf_entity_transform( vdf_node *ent, m4x3f mat );
-
u32
vmf_visgroup_id( vdf_node *root, const char *name );
+
int
vmf_visgroup_id( vdf_node *root, const char *name );
int vmf_visgroup_match( vdf_node *ent, u32 target );
// Currently unused
int vmf_visgroup_match( vdf_node *ent, u32 target );
// Currently unused
@@
-74,7
+74,7
@@
struct vmf_vert
{
v3f co;
v3f nrm;
{
v3f co;
v3f nrm;
- v
2f xy
;
+ v
3f origin
;
};
struct vmf_face
};
struct vmf_face
@@
-422,7
+422,7
@@
ESolidResult solidgen_push( vmf_solid *ctx, vdf_node *node )
v3_divs( center, (float)numpoints, center );
for( ; vert_start < csr_sb_count( ctx->verts ); vert_start ++ )
{
v3_divs( center, (float)numpoints, center );
for( ; vert_start < csr_sb_count( ctx->verts ); vert_start ++ )
{
- v
2_copy( center, ctx->verts[ vert_start ].xy
);
+ v
3_copy( center, ctx->verts[ vert_start ].origin
);
}
// Sort each faces and trianglulalate them
}
// Sort each faces and trianglulalate them
@@
-522,6
+522,9
@@
ESolidResult solidgen_push( vmf_solid *ctx, vdf_node *node )
// Todo, put correct normal
v3_copy( (v3f){ 0.f, 0.f, 1.f }, vert->nrm );
// Todo, put correct normal
v3_copy( (v3f){ 0.f, 0.f, 1.f }, vert->nrm );
+
+ // Todo: use real bounds of displaced vertices
+ v3_copy( center, vert->origin );
}
}
}
}
@@
-817,7
+820,7
@@
void vmf_entity_transform( vdf_node *ent, m4x3f mat )
m4x3_scale( mat, scale );
}
m4x3_scale( mat, scale );
}
-
u32
vmf_visgroup_id( vdf_node *root, const char *name )
+
int
vmf_visgroup_id( vdf_node *root, const char *name )
{
vdf_node *dict = vdf_next( root, "visgroups", NULL );
{
vdf_node *dict = vdf_next( root, "visgroups", NULL );
@@
-832,7
+835,7
@@
u32 vmf_visgroup_id( vdf_node *root, const char *name )
}
}
}
}
- return
0
;
+ return
-1
;
}
int vmf_visgroup_match( vdf_node *ent, u32 target )
}
int vmf_visgroup_match( vdf_node *ent, u32 target )