(svn r21026) -Codechange: move from pcx to png extra grf sprites as they are easier to handle/view. They also take less space in a checkout. Furthermore this requires a recent GRFCodec nightly with PNG support enabled.
This commit is contained in:
@@ -43,7 +43,7 @@ MD5SUM := $(shell [ "$(OS)" = "OSX" ] && echo "md5 -r" || echo "md5sum")
|
||||
|
||||
# Some "should not be changed" settings.
|
||||
NFO_FILES := $(GRF_DIR)/*.nfo
|
||||
PCX_FILES := $(GRF_DIR)/*.pcx
|
||||
PNG_FILES := $(GRF_DIR)/*.png
|
||||
|
||||
# Build the GRF.
|
||||
all: $(BIN_DIR)/openttd.grf
|
||||
@@ -53,14 +53,14 @@ $(OBJS_DIR)/sprites:
|
||||
$(Q)-mkdir "$@"
|
||||
|
||||
# Generic
|
||||
$(BIN_DIR)/openttd.grf: $(PCX_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
|
||||
$(BIN_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
|
||||
@# Only try; if nforenum isn't available, just retouch the file as they likely didn't need it anyway.
|
||||
$(Q) ($(NFORENUM) --help > /dev/null 2>&1 && $(MAKE) $(OBJS_DIR)/openttd.grf && cp $(OBJS_DIR)/openttd.grf $(BIN_DIR)/openttd.grf) || ([ -e $(BIN_DIR)/openttd.grf ] && touch $(BIN_DIR)/openttd.grf && echo "no NFORenum and GRFCodec found, skipping rebuild of openttd.grf...") || (echo "no NFORenum and GRFCodec found, but no openttd.grf either. Install NFORenum and GRFCodec." && exit 1)
|
||||
|
||||
# Yeah, we'd like to use -i in the sed, but Mac OS X's sed and GNU sed just can't agree on the usage of -i. In any case either one of them fails.
|
||||
$(OBJS_DIR)/openttd.grf: $(PCX_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
|
||||
$(OBJS_DIR)/openttd.grf: $(PNG_FILES) $(NFO_FILES) $(OBJS_DIR)/sprites
|
||||
$(E) '$(STAGE) Assembling openttd.nfo'
|
||||
$(Q)-cp $(PCX_FILES) $(OBJS_DIR)/sprites 2> /dev/null
|
||||
$(Q)-cp $(PNG_FILES) $(OBJS_DIR)/sprites 2> /dev/null
|
||||
$(Q) gcc -I$(GRF_DIR) -C -E - < "$(GRF_DIR)/openttd.nfo" | sed -e '/^#/d' -e '/^$$/d' > $(OBJS_DIR)/sprites/openttd.nfo
|
||||
$(Q) $(NFORENUM) $(OBJS_DIR)/sprites/openttd.nfo
|
||||
$(E) '$(STAGE) Compiling openttd.grf'
|
||||
|
||||
Reference in New Issue
Block a user