Skip to content

S2DEX Text Engine

Gregory Heskett edited this page Aug 12, 2024 · 4 revisions

IMPORTANT: S2DEX Text Engine will no longer be available in HackerSM64 v3.0.0 or newer!


S2DEX Text Engine

Features

  • High Quality 64x64 text for your ROM hack
  • Full ASCII Support (Including control characters like \t, \n, and \v)
  • Custom Font Support

Installation

  • In Makefile, set TEXT_ENGINE to s2dex_text_engine (Permalink here)
  • Set your font in src/s2d_engine/config.h; Valid font names are located in src/s2d_engine/fonts

Usage

  • The easiest use case would be to call s2d_print_alloc(x, y, "your message");
  • Use Modifiers like SCALE "(number less than 100)" or DROPSHADOW in your string.
  • To set a base scale value (e.g. if your font is too big by default), head to src/s2d_engine/config.h

Example

s2d_print_alloc(50, 10, SCALE "25" "This is text scaled to 25!\n" "Wow! New Line!" DROPSHADOW "Super Mario Galaxy\n"
                                   SCALE "30" SEPARATOR "9 times out of 10 you dont need to use SEPARATOR\n"
                                    "but if the next string starts with a number then it will make sure\n"
                                    "the number doesnt mess up your calculations.\n"
                      COLOR "255 0 0 255"  "Also text colors!\n" RESET "Finally, use RESET to return to the initial state."
);