From c5daeff5edca4efa63ef7ae10722c047ab120be0 Mon Sep 17 00:00:00 2001 From: John Tsiombikas Date: Fri, 29 Jul 2016 06:02:40 +0300 Subject: [PATCH] fixed gen_box --- src/icon.cc | 2 +- src/meshgen.cc | 2 +- src/opt.cc | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/icon.cc b/src/icon.cc index 502333c..1e92995 100644 --- a/src/icon.cc +++ b/src/icon.cc @@ -87,5 +87,5 @@ static int fstype_shape(FSNodeType type) void ShapesIcons::draw(FSNode *node) const { int s = fstype_shape(node->type); - priv->shape[s]->draw(); + priv->shape[s]->draw_wire(); } diff --git a/src/meshgen.cc b/src/meshgen.cc index b6ae0c8..7664aea 100644 --- a/src/meshgen.cc +++ b/src/meshgen.cc @@ -599,9 +599,9 @@ void gen_box(Mesh *mesh, float xsz, float ysz, float zsz, int usub, int vsub) Mesh m; gen_plane(&m, 1, 1, usub, vsub); + xform.translate(Vec3(0, 0, 0.5)); xform.rotate(Vec3(face_angles[i][1], face_angles[i][0], 0)); dir_xform = xform; - xform.translate(Vec3(0, 0, 0.5)); m.apply_xform(xform, dir_xform); mesh->append(m); diff --git a/src/opt.cc b/src/opt.cc index b25edc5..de3f5a3 100644 --- a/src/opt.cc +++ b/src/opt.cc @@ -39,9 +39,8 @@ bool init_options(int argc, char **argv, const char *cfgfile) optcfg *oc = optcfg_init(options); optcfg_set_opt_callback(oc, opt_handler, 0); - if(cfgfile && optcfg_parse_config_file(oc, cfgfile) == -1) { - optcfg_destroy(oc); - return false; + if(cfgfile) { + optcfg_parse_config_file(oc, cfgfile); } if(argv && optcfg_parse_args(oc, argc, argv) == -1) { -- 1.7.10.4