use a script to output zero-terminated strings instead of bash printf
This commit is contained in:
parent
9e3f6e33e9
commit
255174fc4d
3
Makefile
3
Makefile
|
@ -607,6 +607,7 @@ EMU_FLAGS = --noosd
|
|||
LOADER = loader64
|
||||
LOADER_FLAGS = -vwf
|
||||
SHA1SUM = sha1sum
|
||||
ZEROTERM = $(PYTHON) $(TOOLS_DIR)/zeroterm.py
|
||||
|
||||
###################### Dependency Check #####################
|
||||
|
||||
|
@ -725,7 +726,7 @@ endif
|
|||
# RGBA32, RGBA16, IA16, IA8, IA4, IA1, I8, I4
|
||||
ifeq ($(EXTERNAL_TEXTURES),1)
|
||||
$(BUILD_DIR)/%: %.png
|
||||
printf "%s%b" "$(patsubst %.png,%,$^)" '\x00' > $@
|
||||
$(ZEROTERM) "$(patsubst %.png,%,$^)" > $@
|
||||
else
|
||||
$(BUILD_DIR)/%: %.png
|
||||
$(N64GRAPHICS) -i $@ -g $< -f $(lastword $(subst ., ,$@))
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
import sys
|
||||
if len(sys.argv) < 2:
|
||||
print("usage: zeroterm <string>")
|
||||
else:
|
||||
sys.stdout.buffer.write(bytes(sys.argv[1], 'ascii') + b'\x00')
|
Loading…
Reference in New Issue