S2DEX Text Engine integration

This commit is contained in:
farisawan-2000
2021-06-02 07:52:40 -04:00
parent 21d004ba42
commit cfefcd729e
5 changed files with 44 additions and 4 deletions

View File

@@ -403,6 +403,13 @@ void render_game(void) {
gWarpTransDelay--;
}
}
if (gMarioObject &&gMarioState) {
#include "s2d_engine/init.h"
#include "s2d_engine/s2d_print.h"
s2d_init();
s2d_print_alloc(50, 50, ALIGN_LEFT, SCALE "25" "BRUH MOMentum i guess");
s2d_stop();
}
} else {
render_text_labels();
if (D_8032CE78 != NULL) {

View File

@@ -1,6 +1,8 @@
# Makefile for s2d_engine.a
TARGET = s2d_engine.a
TARGET = libs2d_engine.a
default: all
BUILD_DIR ?= build
DUMMY != mkdir -p $(BUILD_DIR)
@@ -18,14 +20,22 @@ FULL_I_DIRS = $(addprefix $(INCLUDE_BASE),$(I_DIRS))
I_FLAGS = $(foreach i,$(FULL_I_DIRS),-I$(i))
TARGET_CFLAGS = -nostdinc -I include/libc -DTARGET_N64 -DF3DEX_GBI_2 -DNON_MATCHING -DAVOID_UB
CFLAGS := -Wall $(TARGET_CFLAGS) $(I_FLAGS) -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-shared -G 0 -fno-PIC -mno-abicalls -fno-zero-initialized-in-bss -fno-toplevel-reorder -Wno-missing-braces
CFLAGS := -Wall $(TARGET_CFLAGS) $(I_FLAGS) -fno-stack-protector -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-shared -G 0 -fno-PIC -mno-abicalls -fno-zero-initialized-in-bss -fno-toplevel-reorder -Wno-missing-braces
default: all
all: $(BUILD_DIR)/$(TARGET)
clean:
rm -r build/
COPY_DIR := none
ifeq ($(COPY_DIR),none)
$(error S2DEX Text Engine: No COPY_DIR defined!)
endif
$(BUILD_DIR)/$(TARGET): $(O_FILES)
$(AR) rcs -o $@ $(O_FILES)
cp $@ $(COPY_DIR)
$(BUILD_DIR)/%.o: %.c
$(CC) -c $(CFLAGS) -o $@ $<