Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
get_name.inc.c
Go to the documentation of this file.
1/* Writes the name typed, without its leading and trailing spaces, back in
2 half-width characters */
3void OVL_NAME(getName)(NameEntry *task, char *out) {
4 TextTools conv;
5 s32 i;
6
7 for (i = 0; i < task->maxLength * 2; i++) {
8 out[i] = 0;
9 }
10 for (i = task->maxLength - 1; i >= 0 && task->name[i] == SJIS_SPACE; i--) {
11 task->name[i] = 0;
12 }
13 for (i = 0; i < task->maxLength && task->name[i] == SJIS_SPACE; i++) {
14 }
15 initTextTools(&conv);
16 conv.convert(out, &task->name[i], 1);
17}
#define OVL_NAME(name)
The name of this overlay's copy of a function of src/shared/.
Definition battle_mode.h:26
signed int s32
Definition common.h:11
void getName(NameEntry *task, char *out)
Writes the name typed, without its leading and trailing spaces, back in half-width characters.
Definition get_name.inc.c:3
#define SJIS_SPACE
full-width space, 0x81 0x40
Definition name_entry.h:17
A name entry: the keyboard, the name typed so far and the panels that open and close.
Definition name_entry.h:95
Text helpers (initTextTools)
Definition text.h:93
void(* convert)()
(dst, src, mode): font codes <-> Shift-JIS
Definition text.h:96
void initTextTools(TextTools *obj)
Clears a text tools object, gives it its methods and binds it.
Definition text_tools.c:193