Adding center text option

This commit is contained in:
The Gears of Progress 2026-02-06 17:00:30 -05:00
parent 0f725431ce
commit e70caddaf4
2 changed files with 8 additions and 3 deletions

View File

@ -131,7 +131,7 @@ export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
export DEPSDIR := $(CURDIR)/$(BUILD)
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) translated_text.cpp
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
PNGFILES := $(foreach dir,$(GRAPHICS),$(notdir $(wildcard $(dir)/*.png)))
@ -160,7 +160,7 @@ export OFILES_GRAPHICS := $(PNGFILES:.png=.o)
export OFILES := $(OFILES_SOURCES) $(OFILES_GRAPHICS)
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(PNGFILES:.png=.h)
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES))) $(PNGFILES:.png=.h) $(CURDIR)/include/translated_text.h $(CURDIR)/include/fonts.h
export INCLUDE := $(foreach dir,$(INCLUDES),-iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
@ -226,6 +226,9 @@ clean:
@$(MAKE) -C PCCS clean
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).gba data/ to_compress/
@rm -f text_helper/output.json
@rm -f include/fonts.h
@rm -f include/translated_text.h
@rm -f source/translated_text.cpp

View File

@ -20,7 +20,7 @@ class Languages(Enum):
SpanishEU = 5
SpanishLA = 6
FIRST_TRANSLATION_COL_INDEX = 9
FIRST_TRANSLATION_COL_INDEX = 10
BASE_DIR = Path(__file__).resolve().parent
# read by default 1st sheet of an excel file
@ -210,6 +210,7 @@ def convert_item(ogDict, lang):
pixelsInLine = ogDict["pixelsInLine"]
include_box_breaks = ogDict["includeBoxBreaks"]
include_scrolling = ogDict["includeScrolling"]
center_text = ogDict["centerText"]
arr = charArrayOfLanguage[lang]["array"]
escape_list = charArrayOfLanguage[lang]["escape"]
@ -459,6 +460,7 @@ def transfer_xlsx_to_dict():
"pixelsInLine" : currRow.iloc[4],
"includeBoxBreaks": currRow.iloc[5],
"includeScrolling": currRow.iloc[6],
"centerText": currRow.iloc[7]
}
def generate_header_file():