Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Languages: Portal Returns in French and Chinese
Mason Chen56f9b1147c7d
diff --git a/games/portal/Makefile b/games/portal/Makefileindex a74cc487..9f12c9ea 100644--- a/games/portal/Makefile+++ b/games/portal/Makefile@@ -9,7 +9,7 @@ CC = arm-none-eabi-gccNWLINK = npx --yes -- [email protected]BUILD_DIR = outputSRC = src/main.c src/game.c src/gfx.c src/inflate.c src/libc.c-HDR = src/portal.h src/assets.h src/inflate.h+HDR = src/portal.h src/assets.h src/inflate.h ../common/np_text.hCFLAGS = -std=c99 $(shell $(NWLINK) eadk-cflags-device)CFLAGS += -Os -Wall -fno-math-errno -fno-tree-loop-distribute-patterns -fno-reorder-functions -flto-partition=onediff --git a/games/portal/lang/fr.txt b/games/portal/lang/fr.txtnew file mode 100644index 00000000..527ee549--- /dev/null+++ b/games/portal/lang/fr.txt@@ -0,0 +1,72 @@+# Portal Returns in French: the English text as in the source, a tab, the translation (see tools/lang.py).+# The font has capitals only. The chambers' own texts (in assets/main.bin and prelude.bin) stay English.+HELLO? ALLÔ ?+ARE YOU STILL THERE? TU ES TOUJOURS LÀ ?+WHERE DID YOU GO? OÙ ES-TU PASSÉ ?+I GUESS YOU MADE IT THROUGH. J'IMAGINE QUE TU AS RÉUSSI.+FINE, IF YOU WANT TO LEAVE, BON, SI TU VEUX PARTIR,+I GUESS I GET ALL THIS J'AURAI TOUT CE GÂTEAU+CAKE TO MYSELF. POUR MOI TOUTE SEULE.+GOODBYE. ADIEU.+PRESS SHIFT TO FLY APPUIE SUR SHIFT POUR VOLER+ COMPLETE TERMINÉES+PRELUDE PRÉLUDE+PRESS 5 AGAIN TO RESET ENCORE 5 POUR EFFACER+PRESS 5 TO RESET APPUIE SUR 5 POUR EFFACER+LEVEL NIVEAU+CUSTOM PERSO+COLOR COULEUR+HELP AIDE+RETURN REPRENDRE+RESTART RECOMMENCER+QUIT QUITTER+LEFT RIGHT GAUCHE DROITE+RUN COURIR+UP HAUT+JUMP SAUTER+OK OK+PICK UP / DROP PRENDRE / POSER+BACK RETOUR+PAUSE PAUSE+HOW TO PLAY COMMENT JOUER+1-9 SHOOT A 1-9 TIRE UN PORTAIL+PORTAL THAT WAY DANS CE SENS+5 SWITCHES THE 5 CHANGE LA COULEUR+NEXT COLOR: SUIVANTE :+REACH THE RIGHT SIDE ATTEINS LE BORD DROIT DE+OF EACH TEST CHAMBER. CHAQUE CHAMBRE DE TEST.+TEST ELEMENTS ÉLÉMENTS DE TEST+BUTTON: STAND OR PUT A BOUTON : MONTE DESSUS OU+CUBE ON IT TO OPEN DOORS POSE UN CUBE POUR OUVRIR+CUBE: OK PICKS IT UP CUBE : OK LE PREND+AND DROPS IT ET LE POSE+FIZZLER: NO PORTALS GRILLE : NI LES PORTAILS+OR CUBES GET THROUGH NI LES CUBES NE PASSENT+ELECTRIC FIELDS AND CHAMPS ÉLECTRIQUES ET+SPIKES ARE DEADLY PICS SONT MORTELS+GLASS: BEAMS GO THROUGH, VERRE : LES RAYONS PASSENT,+YOU DO NOT PAS TOI+PELLET: DEADLY. GUIDE IT BOULE : MORTELLE. GUIDE-LA+INTO A RECEIVER VERS UN RÉCEPTEUR+OK > OK >+CREDITS CRÉDITS+ INSPIRED BY PORTAL RETURNS INSPIRÉ DE PORTAL RETURNS+ BY MATEOCONLECHUGA. PORTAL DE MATEOCONLECHUGA. PORTAL+ IS BY VALVE. NOT AFFILIATED EST DE VALVE. SANS LIEN+ WITH EITHER OF THEM. AVEC L'UN OU L'AUTRE.+ CHAMBERS: MATEOCONLECHUGA CHAMBRES : MATEOCONLECHUGA+ SPRITES AND TILES: CKH4 SPRITES ET TUILES : CKH4+ PRELUDE: UNICORN, AFTER PRÉLUDE : UNICORN, D'APRÈS+ BUILDERBOY'S PORTAL PRELUDE PORTAL PRELUDE DE BUILDERBOY+ ORIGINAL TESTERS: UNICORN, TESTEURS D'ORIGINE : UNICORN,+ MADE BY MASON CHEN FAIT PAR MASON CHEN+ AS PART OF NUMPLAY. POUR NUMPLAY.+ARROWS: RUN, JUMP. EXIT RIGHT FLÈCHES : BOUGE, SORS À DROITE+1-9: SHOOT A PORTAL THAT WAY 1-9 : UN PORTAIL DANS CE SENS+5: SWITCH THE NEXT COLOR 5 : CHANGE LA COULEUR SUIVANTE+OK: GRAB / DROP A CUBE OK : PRENDS / POSE UN CUBE+BUTTONS OPEN DOORS WHILE HELD BOUTON ENFONCÉ : PORTE OUVERTE+BLUE FIELDS ERASE PORTALS CHAMP BLEU : PORTAILS EFFACÉS+RED FIELDS KILL: STAY CLEAR CHAMP ROUGE : MORTEL, ÉVITE-LE+GUIDE PELLETS INTO RECEIVERS BOULES : VISE LES RÉCEPTEURS+SPIKES KILL: STAY CLEAR PICS MORTELS : ÉVITE-LESdiff --git a/games/portal/lang/zh.txt b/games/portal/lang/zh.txtnew file mode 100644index 00000000..c82e16b6--- /dev/null+++ b/games/portal/lang/zh.txt@@ -0,0 +1,72 @@+# Portal Returns in Chinese: the English text as in the source, a tab, the translation (see tools/lang.py).+# The chambers' own texts (in assets/main.bin and prelude.bin) stay English.+HELLO? 你好?+ARE YOU STILL THERE? 你还在吗?+WHERE DID YOU GO? 你去哪儿了?+I GUESS YOU MADE IT THROUGH. 看来你成功通过了。+FINE, IF YOU WANT TO LEAVE, 好吧,既然你想走,+I GUESS I GET ALL THIS 那这些蛋糕+CAKE TO MYSELF. 就都归我一个人了。+GOODBYE. 再见。+PRESS SHIFT TO FLY 按 SHIFT 键飞行+ COMPLETE 已完成+PRELUDE 序章+PRESS 5 AGAIN TO RESET 再按 5 确认重置+PRESS 5 TO RESET 按 5 重置进度+LEVEL 关卡+CUSTOM 自定义+COLOR 颜色+HELP 帮助+RETURN 继续+RESTART 重新开始+QUIT 退出+LEFT RIGHT 左右键+RUN 奔跑+UP 上键+JUMP 跳跃+OK OK+PICK UP / DROP 拿起 / 放下+BACK 返回键+PAUSE 暂停+HOW TO PLAY 玩法+1-9 SHOOT A 1-9:朝对应方向+PORTAL THAT WAY 发射传送门+5 SWITCHES THE 5:切换下一个+NEXT COLOR: 传送门的颜色:+REACH THE RIGHT SIDE 到达每个测试室的+OF EACH TEST CHAMBER. 右侧出口。+TEST ELEMENTS 测试元素+BUTTON: STAND OR PUT A 按钮:站在上面或放上+CUBE ON IT TO OPEN DOORS 方块,门就会打开+CUBE: OK PICKS IT UP 方块:按 OK 拿起+AND DROPS IT 再按一次放下+FIZZLER: NO PORTALS 消散力场:传送门和+OR CUBES GET THROUGH 方块都无法通过+ELECTRIC FIELDS AND 电场和尖刺+SPIKES ARE DEADLY 都是致命的+GLASS: BEAMS GO THROUGH, 玻璃:光束能穿过,+YOU DO NOT 你不能+PELLET: DEADLY. GUIDE IT 能量球:致命。把它+INTO A RECEIVER 引入接收器+OK > OK >+CREDITS 制作名单+ INSPIRED BY PORTAL RETURNS 灵感来自 MATEOCONLECHUGA+ BY MATEOCONLECHUGA. PORTAL 的 PORTAL RETURNS。PORTAL+ IS BY VALVE. NOT AFFILIATED 是 VALVE 的作品。本作与二者+ WITH EITHER OF THEM. 均无关联。+ CHAMBERS: MATEOCONLECHUGA 测试室:MATEOCONLECHUGA+ SPRITES AND TILES: CKH4 精灵和图块:CKH4+ PRELUDE: UNICORN, AFTER 序章:UNICORN,改编自+ BUILDERBOY'S PORTAL PRELUDE BUILDERBOY 的 PORTAL PRELUDE+ ORIGINAL TESTERS: UNICORN, 原版测试:UNICORN,+ MADE BY MASON CHEN 由 MASON CHEN 制作,+ AS PART OF NUMPLAY. 收录于 NUMPLAY。+ARROWS: RUN, JUMP. EXIT RIGHT 方向键:跑、跳。从右侧离开+1-9: SHOOT A PORTAL THAT WAY 1-9:朝该方向发射传送门+5: SWITCH THE NEXT COLOR 5:切换下一个传送门的颜色+OK: GRAB / DROP A CUBE OK:拿起 / 放下方块+BUTTONS OPEN DOORS WHILE HELD 按钮被压住时,门会打开+BLUE FIELDS ERASE PORTALS 蓝色力场会清除传送门+RED FIELDS KILL: STAY CLEAR 红色力场致命:别碰+GUIDE PELLETS INTO RECEIVERS 把能量球引入接收器+SPIKES KILL: STAY CLEAR 尖刺致命:别碰diff --git a/games/portal/src/game.c b/games/portal/src/game.cindex fdcb89d9..de0e6620 100644--- a/games/portal/src/game.c+++ b/games/portal/src/game.c@@ -1704,8 +1704,14 @@ static bool type_lines(const u8 **pp, int n) {for (int i = 0; i < n; i++) {int x = 6, y = 0x12 + 0x12 * i;while (*p) {+#if NP_TEXT_EXTRA /* (a letter can be a few bytes) */+ const char *q = (const char *)p;+ x = letter(&q, x, y, true);+ p = (const u8 *)q;+#elseglyph(*p++, x, y);x += 5;+#endifif (!fast) {uint64_t until = eadk_timing_millis() + 22;while (eadk_timing_millis() < until) {@@ -1768,8 +1774,9 @@ static void redraw_level(void) { /* after the pause menu */}static const char *const ENDING[] = {- "HELLO?", "ARE YOU STILL THERE?", "WHERE DID YOU GO?", "", "I GUESS YOU MADE IT THROUGH.",- "FINE, IF YOU WANT TO LEAVE,", "I GUESS I GET ALL THIS", "CAKE TO MYSELF.", "", "GOODBYE.", "PRESS SHIFT TO FLY"};+ T("HELLO?"), T("ARE YOU STILL THERE?"), T("WHERE DID YOU GO?"), "", T("I GUESS YOU MADE IT THROUGH."),+ T("FINE, IF YOU WANT TO LEAVE,"), T("I GUESS I GET ALL THIS"), T("CAKE TO MYSELF."), "", T("GOODBYE."),+ T("PRESS SHIFT TO FLY")};static void ending(void) { /* D876 */clear_top();diff --git a/games/portal/src/gfx.c b/games/portal/src/gfx.cindex 283e14f9..1792ea47 100644--- a/games/portal/src/gfx.c+++ b/games/portal/src/gfx.c@@ -111,9 +111,63 @@ void glyph(char c, int x2, int y) {push(x2 * 2, y, 8, 8, gb);}+#if NP_TEXT_EXTRA+/* Other languages. An accented letter is the font's capital with its accent in the 3 rows over it,+ * in 2 pixel wide strokes like the font's (a cedilla in the 2 under it); a Chinese letter, or one the+ * font lacks, comes from the 12-pixel font, its 12 rows on the line's middle. All written opaque, like+ * the font's letters. */+static u16 *xb;+static int xbw, xbh;+static void xplot(int x, int y, void *ctx) {+ if ((unsigned)x < (unsigned)xbw && (unsigned)y < (unsigned)xbh) xb[y * xbw + x] = text_fg;+}+static void accent_plot(int x, int y, void *ctx) { xplot(2 * x - 1, y, ctx), xplot(2 * x, y, ctx); }++int letter(const char **s, int x2, int y, bool draw) {+ static u16 cb[12 * 12];+ uint32_t cp = np_utf8(s);+ char b = (char)cp, b2 = 0;+ int acc = cp >= 0x80 ? np_latin(cp, &b, &b2) : 0;+ if (b >= 'a' && b <= 'z') b -= 32; /* (capitals only) */+ if (b2 >= 'a' && b2 <= 'z') b2 -= 32;+ if (!b || (u8)b - 0x20u >= FONT_CHARS) {+ int w = np_xadvance(cp, 1);+ if (w > 12) w = 12;+ if (draw && w) {+ for (int i = 0; i < w * 12; i++) cb[i] = text_bg;+ xb = cb, xbw = w, xbh = 12;+ np_xdraw(cp, 0, 0, 1, xplot, 0);+ push(x2 * 2, y - 2, w, 12, cb);+ }+ return x2 + (w + 1) / 2;+ }+ if (draw) {+ glyph(b, x2, y);+ if (b2) glyph(b2, x2 + 5, y);+ if (acc) {+ int ced = acc == NP_ACC_CEDIL;+ for (int i = 0; i < 24; i++) cb[i] = text_bg;+ xb = cb, xbw = 8, xbh = ced ? 2 : 3;+ np_accent(acc, 0, 0, 1, accent_plot, 0);+ push(x2 * 2, ced ? y + 8 : y - 3, 8, xbh, cb);+ }+ }+ return x2 + (b2 ? 10 : 5);+}+int text_w(const char *s) {+ int w = 0;+ while (*s) w = letter(&s, w, 0, false);+ return w;+}+#endif+/* Characters every 10 pixels (5 units), like the original. */int text(const char *s, int x2, int y) {+#if NP_TEXT_EXTRA+ while (*s) x2 = letter(&s, x2, y, true);+#elsefor (; *s; s++, x2 += 5) glyph(*s, x2, y);+#endifreturn x2;}diff --git a/games/portal/src/main.c b/games/portal/src/main.cindex e87fc179..d14bd4dc 100644--- a/games/portal/src/main.c+++ b/games/portal/src/main.c@@ -193,10 +193,14 @@ static void progress_line(int pack) {*o++ = '0' + done % 10;*o++ = '/';*o++ = '0' + total / 10, *o++ = '0' + total % 10;- strcpy(o, " COMPLETE");- fill(0, 212, 320, 8, screen_bg);+ strcpy(o, T(" COMPLETE"));+ fill(0, 212 - 3 * NP_TEXT_EXTRA, 320, 8 + 6 * NP_TEXT_EXTRA, screen_bg); /* (and accents, Chinese) */+#if NP_TEXT_EXTRA+ text(s, (160 - text_w(s)) / 2, 212);+#elseint len = (int)strlen(s);text(s, (160 - len * 5) / 2, 212);+#endif}static void help(void);@@ -209,10 +213,10 @@ static void custom_menu(void) {bool armed = false; /* 5 pressed once: the next 5 resets */for (;;) {if (redraw) {- item("PRELUDE", 0, true);+ item(T("PRELUDE"), 0, true);selector(0x47, 0x42, save.level[1], true, is_done(1, save.level[1]));- fill(0x1D * 2, 0x8A, 320 - 0x1D * 2, 8, screen_bg);- text(armed ? "PRESS 5 AGAIN TO RESET" : "PRESS 5 TO RESET", 0x1D, 0x8A);+ fill(0x1D * 2, 0x8A - 3 * NP_TEXT_EXTRA, 320 - 0x1D * 2, 8 + 6 * NP_TEXT_EXTRA, screen_bg);+ text(armed ? T("PRESS 5 AGAIN TO RESET") : T("PRESS 5 TO RESET"), 0x1D, 0x8A);progress_line(1);}redraw = 1;@@ -237,7 +241,7 @@ static void custom_menu(void) {}static void title(void) {- static const char *const items[] = {"LEVEL ", "CUSTOM", "COLOR", "HELP"};+ static const char *const items[] = {T("LEVEL "), T("CUSTOM"), T("COLOR"), T("HELP")};int sel = 0;for (;;) {flush_keys(); /* keys still down from a chamber or a page are not presses */@@ -278,7 +282,7 @@ static void title(void) {/* EB1D: the title art with RETURN / RESTART / QUIT.* Returns 0 to go on, 1 to quit to the title, 2 to restart the level. */int pause_menu(void) {- static const char *const items[] = {"RETURN", "RESTART", "QUIT"};+ static const char *const items[] = {T("RETURN"), T("RESTART"), T("QUIT")};save_write();flush_keys(); /* the Back that opened the menu is not a press in it */title_art();@@ -336,30 +340,31 @@ static void spr_x2(const u8 *s, int x, int y) {static bool help_page(int page) {cls();if (page == 0) {- static const char *const keys[][2] = {{"LEFT RIGHT", "RUN"}, {"UP", "JUMP"}, {"OK", "PICK UP / DROP"}, {"BACK", "PAUSE"}};- text("HOW TO PLAY", 5, 10);+ static const char *const keys[][2] = {{T("LEFT RIGHT"), T("RUN")}, {T("UP"), T("JUMP")},+ {T("OK"), T("PICK UP / DROP")}, {T("BACK"), T("PAUSE")}};+ text(T("HOW TO PLAY"), 5, 10);for (int i = 0; i < 4; i++) {text(keys[i][0], 10, 30 + 16 * i);- text(keys[i][1], 75, 30 + 16 * i);+ text(keys[i][1], NP_TEXT_EXTRA ? 80 : 75, 30 + 16 * i); /* (room for longer keys' names) */}static const char pad[] = "789456123";for (int i = 0; i < 9; i++) key_box(20 + (i % 3) * 26, 104 + (i / 3) * 26, pad[i], i == 4 ? pal[C_ORANGE] : pal[C_BLUE]);- text("1-9 SHOOT A", 55, 108);- text("PORTAL THAT WAY", 55, 124);- text("5 SWITCHES THE", 55, 148);- text("NEXT COLOR:", 55, 164);+ text(T("1-9 SHOOT A"), 55, 108);+ text(T("PORTAL THAT WAY"), 55, 124);+ text(T("5 SWITCHES THE"), 55, 148);+ text(T("NEXT COLOR:"), 55, 164);spr(SPT(0xE1FF), 0x71, 164);- text("REACH THE RIGHT SIDE", 5, 196);- text("OF EACH TEST CHAMBER.", 5, 212);+ text(T("REACH THE RIGHT SIDE"), 5, 196);+ text(T("OF EACH TEST CHAMBER."), 5, 212);} else {- text("TEST ELEMENTS", 5, 10);+ text(T("TEST ELEMENTS"), 5, 10);static const char *const lines[][2] = {- {"BUTTON: STAND OR PUT A", "CUBE ON IT TO OPEN DOORS"},- {"CUBE: OK PICKS IT UP", "AND DROPS IT"},- {"FIZZLER: NO PORTALS", "OR CUBES GET THROUGH"},- {"ELECTRIC FIELDS AND", "SPIKES ARE DEADLY"},- {"GLASS: BEAMS GO THROUGH,", "YOU DO NOT"},- {"PELLET: DEADLY. GUIDE IT", "INTO A RECEIVER"},+ {T("BUTTON: STAND OR PUT A"), T("CUBE ON IT TO OPEN DOORS")},+ {T("CUBE: OK PICKS IT UP"), T("AND DROPS IT")},+ {T("FIZZLER: NO PORTALS"), T("OR CUBES GET THROUGH")},+ {T("ELECTRIC FIELDS AND"), T("SPIKES ARE DEADLY")},+ {T("GLASS: BEAMS GO THROUGH,"), T("YOU DO NOT")},+ {T("PELLET: DEADLY. GUIDE IT"), T("INTO A RECEIVER")},};for (int i = 0; i < 6; i++) {int y = 32 + i * 32;@@ -375,7 +380,7 @@ static bool help_page(int page) {text(lines[i][1], 17, y + 12);}}- text("OK >", 0x8A, 226);+ text(T("OK >"), 0x8A, 226);for (;;) {int k = wait_key();if (k == eadk_key_back) return false;@@ -391,20 +396,20 @@ static void help(void) {static void credits(void) {static const char *const lines[] = {- "CREDITS",- " INSPIRED BY PORTAL RETURNS",- " BY MATEOCONLECHUGA. PORTAL",- " IS BY VALVE. NOT AFFILIATED",- " WITH EITHER OF THEM.",- " CHAMBERS: MATEOCONLECHUGA",- " SPRITES AND TILES: CKH4",- " PRELUDE: UNICORN, AFTER",- " BUILDERBOY'S PORTAL PRELUDE",- " ORIGINAL TESTERS: UNICORN,",+ T("CREDITS"),+ T(" INSPIRED BY PORTAL RETURNS"),+ T(" BY MATEOCONLECHUGA. PORTAL"),+ T(" IS BY VALVE. NOT AFFILIATED"),+ T(" WITH EITHER OF THEM."),+ T(" CHAMBERS: MATEOCONLECHUGA"),+ T(" SPRITES AND TILES: CKH4"),+ T(" PRELUDE: UNICORN, AFTER"),+ T(" BUILDERBOY'S PORTAL PRELUDE"),+ T(" ORIGINAL TESTERS: UNICORN,")," JAMESV, RALPHW74, 123OUTERME","",- " MADE BY MASON CHEN",- " AS PART OF NUMPLAY.",+ T(" MADE BY MASON CHEN"),+ T(" AS PART OF NUMPLAY."),};cls();for (unsigned i = 0; i < sizeof lines / sizeof *lines; i++) text(lines[i], 5, 8 + 16 * i);@@ -416,9 +421,9 @@ static void credits(void) {* While it is up, the game draws around it (sign_clip). */static int hint_pending[8], nhints;static const char *const HINTS[] = {- "ARROWS: RUN, JUMP. EXIT RIGHT", "1-9: SHOOT A PORTAL THAT WAY", "5: SWITCH THE NEXT COLOR",- "OK: GRAB / DROP A CUBE", "BUTTONS OPEN DOORS WHILE HELD", "BLUE FIELDS ERASE PORTALS",- "RED FIELDS KILL: STAY CLEAR", "GUIDE PELLETS INTO RECEIVERS", "SPIKES KILL: STAY CLEAR",+ T("ARROWS: RUN, JUMP. EXIT RIGHT"), T("1-9: SHOOT A PORTAL THAT WAY"), T("5: SWITCH THE NEXT COLOR"),+ T("OK: GRAB / DROP A CUBE"), T("BUTTONS OPEN DOORS WHILE HELD"), T("BLUE FIELDS ERASE PORTALS"),+ T("RED FIELDS KILL: STAY CLEAR"), T("GUIDE PELLETS INTO RECEIVERS"), T("SPIKES KILL: STAY CLEAR"),};/* hints 0-7 in save.hints, hint 8 in bit 1 of save.flags */@@ -482,7 +487,11 @@ bool hint_tick(void (*restore)(void)) {hint_mark(hint_now);save_write();hint_t = 47 * 4;+#if NP_TEXT_EXTRA+ sign_w = text_w(HINTS[hint_now]) * 2 + 8;+#elsesign_w = (int)strlen(HINTS[hint_now]) * 10 + 8;+#endifsign_x = sign_place(sign_w);sign_draw();return true;diff --git a/games/portal/src/portal.h b/games/portal/src/portal.hindex fa1d19f5..5dcdc17a 100644--- a/games/portal/src/portal.h+++ b/games/portal/src/portal.h@@ -9,6 +9,7 @@#include <eadk.h>#include <stdbool.h>#include <stdint.h>+#include "../../common/np_text.h"typedef uint8_t u8;typedef int8_t s8;@@ -30,6 +31,10 @@ void tile_draw(int t, int col, int row);void fill(int x, int y, int w, int h, u16 c);void cls(void); /* whole screen in the text background */int text(const char *s, int x2, int y); /* returns the x after the text */+#if NP_TEXT_EXTRA+int letter(const char **s, int x2, int y, bool draw); /* the next letter of *s; returns the x after it */+int text_w(const char *s); /* in 2 px units */+#endifvoid glyph(char c, int x2, int y);int number(int v, int x2, int y);void sign_clip(int x0, int x1); /* keep drawing off the hint sign (x0 == x1: off) */