summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--include/text.h7
-rw-r--r--src/text.c4
3 files changed, 13 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index b962140e8..64ab7f1da 100644
--- a/Makefile
+++ b/Makefile
@@ -87,22 +87,28 @@ src/agb_flash_mx.o: CFLAGS := -O -mthumb-interwork
src/m4a_2.o: CC1 := tools/agbcc/bin/old_agbcc
src/m4a_4.o: CC1 := tools/agbcc/bin/old_agbcc
-$(C_OBJS): %.o : %.c
+ifeq ($(NODEP),)
+%.o: c_dep = $(shell $(SCANINC) $*.c)
+else
+%.o: c_dep :=
+endif
+
+$(C_OBJS): %.o : %.c $$(c_dep)
@$(CPP) $(CPPFLAGS) $< -o $*.i
@$(PREPROC) $*.i charmap.txt | $(CC1) $(CFLAGS) -o $*.s
@echo -e ".text\n\t.align\t2, 0\n" >> $*.s
$(AS) $(ASFLAGS) -o $@ $*.s
ifeq ($(NODEP),)
-%.o: dep = $(shell $(SCANINC) $*.s)
+%.o: asm_dep = $(shell $(SCANINC) $*.s)
else
-%.o: dep :=
+%.o: asm_dep :=
endif
-$(ASM_OBJS): %.o: %.s $$(dep)
+$(ASM_OBJS): %.o: %.s $$(asm_dep)
$(AS) $(ASFLAGS) -o $@ $<
-$(DATA_ASM_OBJS): %.o: %.s $$(dep)
+$(DATA_ASM_OBJS): %.o: %.s $$(asm_dep)
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) -o $@
sym_bss.ld: sym_bss.txt
diff --git a/include/text.h b/include/text.h
index d8fc6f89d..3641548aa 100644
--- a/include/text.h
+++ b/include/text.h
@@ -73,13 +73,6 @@ struct FontInfo
u8 shadowColor:4;
};
-struct Bitmap // TODO: Find a better spot for this
-{
- u8* pixels;
- u32 width:16;
- u32 height:16;
-};
-
struct GlyphWidthFunc{
u32 font_id;
u32 (*func)(u16 glyphId, bool32 isJapanese);
diff --git a/src/text.c b/src/text.c
index 835e0f389..6981b9370 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1771,8 +1771,8 @@ void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
{
window = &gWindows[textPrinter->subPrinter.windowId];
pixels_data.pixels = window->tileData;
- pixels_data.width = window->width << 3;
- pixels_data.height = window->height << 3;
+ pixels_data.width = window->window.width << 3;
+ pixels_data.height = window->window.height << 3;
gUnk = gUnknown_03002F90;
glyphHeight = &gUnk[0x81];