Home

Awesome

S2DEX Text Engine

How to "Install"

#include "src/s2d_engine/config.h"
#include FONT_C_FILE

Simple Usage (Sample Program)

#include "s2d_engine/init.h"
#include "s2d_engine/s2d_draw.h"
#include "s2d_engine/s2d_print.h"

char myString[] = "This is a " SCALE "200" "test string!\n"
                "Supports a bunch of standard " ROTATE "-36" "escape characters!\n"
                "\tIncluding " COLOR "255 0 0 0" "Colorful text!\n"
                COLOR "255 255 255 0" DROPSHADOW "And look at these shadows!";

// ...
void render_game(void) {
	// do game rendering and stuff
	// ...

	// initialized S2DEX; only needed once before all prints
	s2d_init();

	// Allows you to print from anywhere in the game
	// as long as this is run directly afterwards
	s2d_handle_deferred();

	// reloads the original microcode; only needed once after all prints
	s2d_stop();
}

void some_actor_function(void) {
	s2d_print_deferred(50, 50, myString); // It's that easy!
}

Command Usage

(All numbers must be in base 10)