summaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-09-26 20:56:08 +0000
committerrodri <rgl@antares-labs.eu>2024-09-26 20:56:08 +0000
commit6b01863dcb76ba8ef49d5ab0790f546d7c8645f7 (patch)
tree3ad45ba80832bf331f8c4ab3fc90216c9cfdac13 /vis.c
parent11b9c1697a3fd518c8b133544f0abbdb915a2491 (diff)
download3dee-6b01863dcb76ba8ef49d5ab0790f546d7c8645f7.tar.gz
3dee-6b01863dcb76ba8ef49d5ab0790f546d7c8645f7.tar.bz2
3dee-6b01863dcb76ba8ef49d5ab0790f546d7c8645f7.zip
new tool: obj. and changes to use the new model(6) format.
with this change some models were also completely turned from obj into model(6) ones: 9fs, cirno, and diablo3.
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index a6538e7..7a61602 100644
--- a/vis.c
+++ b/vis.c
@@ -6,7 +6,6 @@
#include <mouse.h>
#include <keyboard.h>
#include <geometry.h>
-#include "libobj/obj.h"
#include "libgraphics/graphics.h"
#include "dat.h"
#include "fns.h"
@@ -667,7 +666,13 @@ threadmain(int argc, char *argv[])
else
while(argc--){
mdlpath = argv[argc];
- model = readobjmodel(mdlpath);
+ fd = open(mdlpath, OREAD);
+ if(fd < 0)
+ sysfatal("open: %r");
+ model = readmodel(fd);
+ if(model == nil)
+ sysfatal("readmodel: %r");
+ close(fd);
subject = newentity(mdlpath, model);
// subject->p.z = -argc*4;
scene->addent(scene, subject);