diff --git a/Makefile b/Makefile index 215c98c..1135280 100755 --- a/Makefile +++ b/Makefile @@ -7,8 +7,11 @@ all: vvm clean: -$(RM) vvm vvm.o + +%.o : %.cpp + $(CXX) -o $@ -c $< vvm: vvm.o - $(CXX) $(CXXFLAGS) -o vvm vvm.o -vvm.o: - $(CXX) -o vvm.o -c vvm.cpp + $(CXX) -o vvm $^ + +vvm.o: vvm.cpp vvm.h util.h diff --git a/Makefile.mingw b/Makefile.mingw index 1f5251b..3c6faf1 100755 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -7,9 +7,12 @@ default: all all: vvm.exe clean: - -$(RM) vvm.exe vvm.exe.o + -$(RM) vvm.exe vvm.w32.o -vvm.exe: vvm.exe.o - $(CXX) $(CXXFLAGS) -o vvm.exe vvm.exe.o -static -static-libgcc -static-libstdc++ -vvm.exe.o: - $(CXX) -o vvm.exe.o -c vvm.cpp +%.w32.o : %.cpp + $(CXX) -o $@ -c $< + +vvm.exe: vvm.w32.o + $(CXX) -o vvm.exe $^ -static -static-libgcc -static-libstdc++ + +vvm.w32.o: vvm.cpp vvm.h util.h diff --git a/vvm.cpp b/vvm.cpp index c8508bc..a0c381a 100644 --- a/vvm.cpp +++ b/vvm.cpp @@ -3,10 +3,12 @@ #define VVM_UNPACK (1u<<31) //animations will be unpacked into individual frames-as-animations (ie: no more framegroups) #define VVM_ALLPRIVATE (VVM_UNPACK) -bool noext = false; +bool noext = false; /* not fully working */ bool verbose = false; bool quiet = false; +bool ext_detected = false; + struct ejoint { const char *name; @@ -4644,8 +4646,9 @@ bool parsemeshfield(const char *tok, char **line, meshprop &spec, bool defaults) }; spec.surfaceflags = parsebits(surfaceflagnames, line); } - else if (!strcasecmp(tok, "body")) + else if (!strcasecmp(tok, "body")) { spec.body = strtoul(mystrtok(line), NULL, 0); + } else if (!strcasecmp(tok, "geomset")) { spec.geomset = strtoul(mystrtok(line), NULL, 0); @@ -4658,6 +4661,8 @@ bool parsemeshfield(const char *tok, char **line, meshprop &spec, bool defaults) } else return false; + + ext_detected = true; return true; } @@ -4721,6 +4726,7 @@ bool parseanimfield(const char *tok, char **line, filespec &spec, bool defaults) } ev.evcode = atoi(mystrtok(line)); ev.evdata_str = newstring(mystrtok(line)); + ext_detected = true; } else if (parsemeshfield(tok, line, spec.meshprops, defaults)) ; @@ -4999,7 +5005,7 @@ int main(int argc, char **argv) if(writevvm(outfile)) { if (!quiet) - conoutf("exported: %s", outfile); + conoutf("exported %s format file: %s", ext_detected ? "VVM" : "IQM", outfile); } else fatal("failed writing: %s", outfile);