diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-09-19 00:53:41 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-09-19 00:53:41 +0900 |
commit | 96d11d0e5bd23b6a7128f48dfc6233132c6166c6 (patch) | |
tree | 0ee18914da8f3721137a939016cafd7327695cae /fmdriver/fmdriver_pmd.c | |
parent | 1ff3793322585443909d11284457811c461f8de4 (diff) |
fmdsp-pacc: add comment display
Diffstat (limited to 'fmdriver/fmdriver_pmd.c')
-rw-r--r-- | fmdriver/fmdriver_pmd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fmdriver/fmdriver_pmd.c b/fmdriver/fmdriver_pmd.c index a57a916..343152b 100644 --- a/fmdriver/fmdriver_pmd.c +++ b/fmdriver/fmdriver_pmd.c @@ -5872,16 +5872,27 @@ void pmd_filenamecopy(char *dest, const char *src) { dest[0] = 0; } +static const char *pmd_get_comment(struct fmdriver_work *work, int line) { + struct driver_pmd *pmd = work->driver; + if (line < 0) return 0; + const char *str = pmd_get_memo(pmd, line + 1); + if (str && !*str) return 0; + return str; +} + void pmd_init(struct fmdriver_work *work, struct driver_pmd *pmd) { // TODO: reset ppz8 // 0f99 work->driver = pmd; + work->comment_mode_pmd = true; + work->get_comment = pmd_get_comment; pmd_reset_opna(work, pmd); pmd_reset_timer(work, pmd); pmd->playing = true; work->driver_opna_interrupt = pmd_opna_interrupt; + /* static const int memotable[3] = {1, 4, 5}; for (int i = 0; i < 3; i++) { const char *title = pmd_get_memo(pmd, memotable[i]); @@ -5894,6 +5905,7 @@ void pmd_init(struct fmdriver_work *work, } work->comment[i][c] = 0; } + */ const char *pcmfile = pmd_get_memo(pmd, -2); if (pcmfile) { pmd_filenamecopy(pmd->ppzfile, pcmfile); |