Let user know what the output format is compatible with.

This commit is contained in:
Marco Cawthorne 2021-08-09 12:53:35 +02:00
parent 5ec3c95bae
commit 74e5f22c76
3 changed files with 23 additions and 11 deletions

View File

@ -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

View File

@ -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

12
vvm.cpp
View File

@ -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);