read the save, the seed and the worldgen assets
The engine's save classes are closed, so the protobuf field numbers were read off the data and matched to the map sizes TerraGenConfig gives. vsmv dump renders what the save stored, as the reference the generator will be diffed against. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
13
Makefile
13
Makefile
@@ -4,7 +4,9 @@
|
||||
SEXC ?= $(HOME)/dev/sex/sexc
|
||||
CFLAGS ?= -O2 -g
|
||||
CFLAGS += -std=c11 -Wall -ffp-contract=off -fwrapv
|
||||
CPPFLAGS += -Isrc -Ithird_party/nuklear -IcJSON $(shell pkg-config --cflags sdl3)
|
||||
CPPFLAGS += -Isrc -Ithird_party/nuklear -Ithird_party/stb -IcJSON $(shell pkg-config --cflags sdl3)
|
||||
# Sex writes C with only the parentheses precedence needs.
|
||||
SEX_CFLAGS = -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-shift-op-parentheses
|
||||
SDL_LIBS := $(shell pkg-config --libs sdl3)
|
||||
|
||||
B = build
|
||||
@@ -17,7 +19,7 @@ all: $(B)/vsmv $(B)/vs-map-viewer
|
||||
SEX_SRC := $(wildcard src/*.sex)
|
||||
|
||||
$(B)/%.o: src/%.sex $(SEX_SRC) | $(B)
|
||||
$(SEXC) $< -c -o $@ -- $(CFLAGS) $(CPPFLAGS)
|
||||
$(SEXC) $< -c -o $@ -- $(CFLAGS) $(SEX_CFLAGS) $(CPPFLAGS)
|
||||
|
||||
$(B)/nk.o: src/nk.c src/nk.h | $(B)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
@@ -25,7 +27,12 @@ $(B)/nk.o: src/nk.c src/nk.h | $(B)
|
||||
$(B)/cJSON.o: cJSON/cJSON.c cJSON/cJSON.h | $(B)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(B)/vsmv: $(B)/vsmv.o $(B)/cJSON.o
|
||||
$(B)/stb.o: src/stb.c third_party/stb/stb_image_write.h | $(B)
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
VSMV_OBJ = vsmv cs pb json save img dump cJSON stb
|
||||
|
||||
$(B)/vsmv: $(VSMV_OBJ:%=$(B)/%.o)
|
||||
$(CC) $^ -o $@ -lsqlite3
|
||||
|
||||
$(B)/vs-map-viewer: $(B)/viewer.o $(B)/nk.o
|
||||
|
||||
Reference in New Issue
Block a user