aboutsummaryrefslogtreecommitdiff
path: root/source/nds
diff options
context:
space:
mode:
authorNebuleon Fumika2013-02-06 16:16:43 -0500
committerNebuleon Fumika2013-02-06 16:16:43 -0500
commit0b165c3133b2c97bfe2eaf6195f36094c1213164 (patch)
tree40c77740e12785a23685d12d657cacf835d6cc9c /source/nds
parentebf48b1bf77d0093277640fd514877b3b26baeac (diff)
downloadsnes9x2005-0b165c3133b2c97bfe2eaf6195f36094c1213164.tar.gz
snes9x2005-0b165c3133b2c97bfe2eaf6195f36094c1213164.tar.bz2
snes9x2005-0b165c3133b2c97bfe2eaf6195f36094c1213164.zip
Use key pictograms from Pictochat to display keys for yes/no dialog(ue)s.
Diffstat (limited to 'source/nds')
-rw-r--r--source/nds/gui.c58
1 files changed, 56 insertions, 2 deletions
diff --git a/source/nds/gui.c b/source/nds/gui.c
index 5e02a55..7270891 100644
--- a/source/nds/gui.c
+++ b/source/nds/gui.c
@@ -4140,7 +4140,61 @@ int load_language_msg(char *filename, u32 language)
break;
len= strlen(pt);
- memcpy(dst, pt, len);
+ // memcpy(dst, pt, len);
+
+ // Replace key definitions (*letter) with Pictochat icons
+ // while copying.
+ unsigned int curChar;
+ for (curChar = 0; curChar < len; curChar++)
+ {
+ if (pt[curChar] == '*')
+ {
+ switch (pt[curChar + 1])
+ {
+ case 'A':
+ memcpy(&dst[curChar], HOTKEY_A_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'B':
+ memcpy(&dst[curChar], HOTKEY_B_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'X':
+ memcpy(&dst[curChar], HOTKEY_X_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'Y':
+ memcpy(&dst[curChar], HOTKEY_Y_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'L':
+ memcpy(&dst[curChar], HOTKEY_L_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'R':
+ memcpy(&dst[curChar], HOTKEY_R_DISPLAY, 2);
+ curChar++;
+ break;
+ case 'S':
+ memcpy(&dst[curChar], HOTKEY_START_DISPLAY, 2);
+ curChar++;
+ break;
+ case 's':
+ memcpy(&dst[curChar], HOTKEY_SELECT_DISPLAY, 2);
+ curChar++;
+ break;
+ case '\0':
+ dst[curChar] = pt[curChar];
+ break;
+ default:
+ memcpy(&dst[curChar], &pt[curChar], 2);
+ curChar++;
+ break;
+ }
+ }
+ else
+ dst[curChar] = pt[curChar];
+ }
dst += len;
//at a line return, when "\n" paded, this message not end
@@ -4163,7 +4217,7 @@ int load_language_msg(char *filename, u32 language)
else//a message end
{
if(*(dst-2) == 0x0D)
- dst -= 1;
+ dst -= 1;
*(dst-1) = '\0';
msg[++loop] = dst;
}